package VIRTUAL;

import bdd.Otros.LOGIN;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Image;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.image.BufferedImage;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;
import javax.swing.DefaultListModel;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.RowFilter;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableRowSorter;

public class PRINCIPAL extends javax.swing.JFrame {

    Calendar fecha = new GregorianCalendar();
    private Dimension dim;
    private TableRowSorter trsfiltro;
    conexion con = new conexion();
    conexion conn = new conexion();
    DefaultTableModel modelo, modelo1, modelo2, modelo4, modelo5, modelo6, modelo7, modelo8;
    ResultSet rss, cor, tels, rr;
    PreparedStatement ps;
    ResultSet rs, rsi;
    ResultSetMetaData rsm;
    DefaultTableModel dtm;
    CallableStatement st;
    private FileInputStream dis;
//LISTA
    private DefaultListModel modeloLista = new DefaultListModel();
    private DefaultListModel modeloLista1 = new DefaultListModel();

    public PRINCIPAL() {
        initComponents();
        ImageIcon IconAux = new ImageIcon(getClass().getResource("/fondos/fondo2.png"));
        ImageIcon temp = new ImageIcon(IconAux.getImage().getScaledInstance(fondo.getWidth(), fondo.getHeight(), Image.SCALE_DEFAULT));
        fondo.setIcon(temp);
        //PONE EL FOCO EN JTABLEPANEL AL INICIAR EL PROGRAMA
        jTabbedPane1.requestFocusInWindow();

        otros();
        //LISTA DE USUARIOS
        lista_user();

        jTextField3.setVisible(false);

        modelo.addColumn("Codigo persona");
        modelo.addColumn("TIPO DE PERSONA");
        modelo.addColumn("Nombre");
        modelo.addColumn("Sexo");
        modelo.addColumn("Teléfono");
        modelo.addColumn("Correo electrónico");
        modelo.addColumn("Direccion");
        modelo.addColumn("Fecha registro");
        this.jTable4.setModel(modelo);
        //MENU ELIMINAR 
        jLabel30.setIcon(ajustarImagen3());
        //TABLA PRODUCTO 
        modelo1 = new DefaultTableModel();
        modelo1.addColumn("Codigo producto");
        modelo1.addColumn("Producto");
        modelo1.addColumn("Categoria");
        modelo1.addColumn("Cantidad maxima");
        modelo1.addColumn("Cantidad minima");
        modelo1.addColumn("Precio compra");
        modelo1.addColumn("Precio Venta");
        this.jTable6.setModel(modelo1);
        //MENU VENTAS
        modelo2 = new DefaultTableModel();
        modelo2.addColumn("CODIGO PRODUCTO");
        modelo2.addColumn("DESCRIPCION DEL PRODUCTO");
        modelo2.addColumn("CATEGORIA");
        modelo2.addColumn("PRECIO VENTA");
        modelo2.addColumn("CANTIDAD");
        modelo2.addColumn("IMPORTE");
        modelo2.addColumn("EXISTENCIA");
        this.jTable1.setModel(modelo2);

        modelo4 = (DefaultTableModel) jTable1.getModel();
        //MENU DE EMPLEOS        
        modelo5 = new DefaultTableModel();
        modelo5.addColumn("CODIGO EMPLEO");
        modelo5.addColumn("TRABAJO");
        modelo5.addColumn("SUELDO");
        this.jTable5.setModel(modelo5);
        //MENU DE VENTAS POR PERIODO
        modelo6 = new DefaultTableModel();
        modelo6.addColumn("CODIGO VENTA");
        modelo6.addColumn("DESCRIPCION DEL PRODUCTO");
        modelo6.addColumn("CANTIDAD DE VENTA");
        modelo6.addColumn("TOTAL A PAGAR");
        modelo6.addColumn("VENTA REALIZADA POR");
        modelo6.addColumn("FECHA DE VENTA");
        modelo6.addColumn("HORA DE VENTA");
        this.jTable10.setModel(modelo6);
        //MENU DE DIALOGO BUSQUEDAS
        modelo7 = new DefaultTableModel();
        modelo7.addColumn("CODIGO PRODUCTO");
        modelo7.addColumn("DESCRIPCION ");
        modelo7.addColumn("CATEGORIA");
        modelo7.addColumn("PRECIO");
        modelo7.addColumn("EXISTENCIA");
        this.jTable9.setModel(modelo7);
        //MENU DE PRODUCTOS BAJOS
        modelo8 = new DefaultTableModel();
        modelo8.addColumn("CODIGO PRODUCTO");
        modelo8.addColumn("DESCRIPCION ");
        modelo8.addColumn("CATEGORIA");
        modelo8.addColumn("CANTIDAD");
        this.jTable2.setModel(modelo8);
        //JCOMBOBOX DE PROVEEDORES DE MENU COMPRAS
        prov();
        //JCOMBOBOX DE USUARIOS
        combo_user();
        //JOCOMBOBOX DE PRODUCTO 
        combo_producto();
        //JOCOMBOBOX DE empleados
        combo_empleados();
        // http://localhost:9999/PulseWSInterface / PulseWS ? Tester

    }

    public void otros() {
        jLabel93.setIcon(logo());
        jLabel101.setVisible(false);
        jComboBox5.setVisible(false);
        // PARA PONER LA PANTALA COMPLETA
        dim = super.getToolkit().getScreenSize();
        super.setSize(dim);

        modelo = new DefaultTableModel();
        modelo1 = new DefaultTableModel();
        //DESABILITAR LA EDICION DE TABLAS
        modelo = new DefaultTableModel() {
            public boolean isCellEditable(int fila, int columna) {
                if (columna > 2) {
                    return true;
                }
                return false;
            }
        };
        modelo1 = new DefaultTableModel() {
            public boolean isCellEditable(int fila, int columna) {
                if (columna > 3) {
                    return true;
                }
                return false;
            }
        };
    }

    public void combo_user() {
        try {
            con.conectar();
            java.sql.Statement stmt = con.getConexion().createStatement();

            rss = stmt.executeQuery("select id_per from tipo_per");
            while (rss.next()) {
                jComboBox1.addItem(rss.getString("id_per")); //agregamos el valor de la base de datos al jcombobox  
            }
        } catch (Exception e) {
        }
    }

    public void lista_user() {
        try {
            modeloLista1.clear();

            con.conectar();
            java.sql.Statement stmt = con.getConexion().createStatement();
            rs = stmt.executeQuery("select nombre_usuario from usuarios");
            while (rs.next()) {
                modeloLista1.addElement(rs.getString("nombre_usuario"));
                jList2.setModel(modeloLista1);
            }
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(null, ex.getMessage());
        }
    }

    public void prov() {
        try {
            con.conectar();
            java.sql.Statement stmt = con.getConexion().createStatement();

            rss = stmt.executeQuery("select * from prov");
            while (rss.next()) {
                jComboBox5.addItem(rss.getString("nombre")); //agregamos el valor de la base de datos al jcombobox  
            }
        } catch (Exception e) {
        }
    }

    public String fecha() {
        int año = fecha.get(Calendar.YEAR);
        int mes = fecha.get(Calendar.MONTH);
        int dia = fecha.get(Calendar.DAY_OF_MONTH);
        String d = Integer.toString(dia);
        int mee = mes + 1;
        String me = Integer.toString(mee);
        String a = Integer.toString(año);
        String imp = d + "/" + (me) + "/" + a;
        //   System.out.println(imp);
        return imp;
    }

    public String hora() {
        int hora = fecha.get(Calendar.HOUR_OF_DAY);
        int minuto = fecha.get(Calendar.MINUTE);
        int segundo = fecha.get(Calendar.SECOND);
        String h = Integer.toString(hora);
        String m = Integer.toString(minuto);
        String s = Integer.toString(segundo);
        String hor = h + ":" + m + ":" + s;
        return hor;
    }

    public void combo_producto() {
        try {
            con.conectar();
            java.sql.Statement stmt = con.getConexion().createStatement();

            rss = stmt.executeQuery("select nom_producto from producto");
            while (rss.next()) {
                jComboBox9.addItem(rss.getString("nom_producto"));
            }
        } catch (Exception e) {
        }
    }

    public void combo_empleados() {
        try {
            con.conectar();
            java.sql.Statement stmt = con.getConexion().createStatement();

            rss = stmt.executeQuery("select cargo from empleos");
            while (rss.next()) {
                jComboBox6.addItem(rss.getString("cargo"));
            }
        } catch (Exception e) {
        }
    }

    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        Sexo = new javax.swing.ButtonGroup();
        Opciones_tabla = new javax.swing.JPopupMenu();
        Editar = new javax.swing.JMenuItem();
        Eliminar = new javax.swing.JMenuItem();
        Menu_foto = new javax.swing.JPopupMenu();
        foto = new javax.swing.JMenuItem();
        foto_producto = new javax.swing.JPopupMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        tabla_producto = new javax.swing.JPopupMenu();
        Editar1 = new javax.swing.JMenuItem();
        Eliminar1 = new javax.swing.JMenuItem();
        Tabla_Empleos = new javax.swing.JPopupMenu();
        Editar_empleo = new javax.swing.JMenuItem();
        Eliminar_empleo = new javax.swing.JMenuItem();
        Dialogo_Buscar = new javax.swing.JDialog();
        jButton38 = new javax.swing.JButton();
        jTextField16 = new javax.swing.JTextField();
        jLabel90 = new javax.swing.JLabel();
        jScrollPane11 = new javax.swing.JScrollPane();
        jTable9 = new javax.swing.JTable();
        jButton39 = new javax.swing.JButton();
        jButton40 = new javax.swing.JButton();
        jLabel92 = new javax.swing.JLabel();
        jSpinner3 = new javax.swing.JSpinner();
        Dialogo_Cobrar = new javax.swing.JDialog();
        jButton42 = new javax.swing.JButton();
        jButton43 = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        precio_cobrar = new javax.swing.JLabel();
        jLabel89 = new javax.swing.JLabel();
        jLabel94 = new javax.swing.JLabel();
        jLabel95 = new javax.swing.JLabel();
        jTextField21 = new javax.swing.JTextField();
        jLabel96 = new javax.swing.JLabel();
        precio_cobrar1 = new javax.swing.JLabel();
        jButton7 = new javax.swing.JButton();
        Menu_lista_almacen = new javax.swing.JPopupMenu();
        Delete = new javax.swing.JMenuItem();
        lista_Usuarios = new javax.swing.JPopupMenu();
        Editar_lista = new javax.swing.JMenuItem();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        TICKET1 = new javax.swing.JTabbedPane();
        jPanel7 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jLabel2 = new javax.swing.JLabel();
        jPanel8 = new javax.swing.JPanel();
        jButton8 = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();
        jLabel88 = new javax.swing.JLabel();
        jLabel49 = new javax.swing.JLabel();
        jPanel31 = new javax.swing.JPanel();
        jLabel91 = new javax.swing.JLabel();
        jScrollPane12 = new javax.swing.JScrollPane();
        jTable10 = new javax.swing.JTable();
        jButton37 = new javax.swing.JButton();
        jComboBox4 = new javax.swing.JComboBox();
        jTextField12 = new javax.swing.JTextField();
        jButton5 = new javax.swing.JButton();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jButton3 = new javax.swing.JButton();
        jButton6 = new javax.swing.JButton();
        jTextField1 = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jButton22 = new javax.swing.JButton();
        jLabel57 = new javax.swing.JLabel();
        jTextField32 = new javax.swing.JTextField();
        jButton35 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jTabbedPane3 = new javax.swing.JTabbedPane();
        jPanel9 = new javax.swing.JPanel();
        jLabel30 = new javax.swing.JLabel();
        jPanel23 = new javax.swing.JPanel();
        id_persona = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jTextField4 = new javax.swing.JTextField();
        jTextField6 = new javax.swing.JTextField();
        personas = new javax.swing.JComboBox();
        jLabel22 = new javax.swing.JLabel();
        correo = new javax.swing.JComboBox();
        jLabel21 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        tel = new javax.swing.JTextField();
        jComboBox10 = new javax.swing.JComboBox();
        jTextField33 = new javax.swing.JTextField();
        jPanel24 = new javax.swing.JPanel();
        jLabel24 = new javax.swing.JLabel();
        nom = new javax.swing.JTextField();
        col = new javax.swing.JTextField();
        jTextField8 = new javax.swing.JTextField();
        jLabel25 = new javax.swing.JLabel();
        jLabel26 = new javax.swing.JLabel();
        jTextField10 = new javax.swing.JTextField();
        jLabel27 = new javax.swing.JLabel();
        estados = new javax.swing.JComboBox();
        jLabel28 = new javax.swing.JLabel();
        jButton13 = new javax.swing.JButton();
        jLabel29 = new javax.swing.JLabel();
        jButton17 = new javax.swing.JButton();
        jPanel10 = new javax.swing.JPanel();
        jLabel31 = new javax.swing.JLabel();
        RFC = new javax.swing.JTextField();
        jLabel32 = new javax.swing.JLabel();
        jPanel25 = new javax.swing.JPanel();
        person = new javax.swing.JTextField();
        nomm = new javax.swing.JTextField();
        jLabel33 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        jTextField11 = new javax.swing.JTextField();
        sex = new javax.swing.JTextField();
        jLabel35 = new javax.swing.JLabel();
        jLabel41 = new javax.swing.JLabel();
        nom2 = new javax.swing.JTextField();
        jLabel39 = new javax.swing.JLabel();
        jTextField15 = new javax.swing.JTextField();
        col1 = new javax.swing.JTextField();
        jLabel38 = new javax.swing.JLabel();
        jLabel42 = new javax.swing.JLabel();
        jLabel36 = new javax.swing.JLabel();
        jTextField14 = new javax.swing.JTextField();
        jLabel40 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jTextField13 = new javax.swing.JTextField();
        nom1 = new javax.swing.JTextField();
        Eliminar_registros = new javax.swing.JButton();
        Actualizar = new javax.swing.JButton();
        Buscar = new javax.swing.JButton();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTable4 = new javax.swing.JTable();
        jPanel26 = new javax.swing.JPanel();
        jLabel43 = new javax.swing.JLabel();
        jComboBox3 = new javax.swing.JComboBox();
        jTextField5 = new javax.swing.JTextField();
        jPanel11 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jComboBox1 = new javax.swing.JComboBox();
        jLabel67 = new javax.swing.JLabel();
        nom4 = new javax.swing.JTextField();
        jLabel68 = new javax.swing.JLabel();
        jTextField25 = new javax.swing.JTextField();
        jLabel69 = new javax.swing.JLabel();
        jPasswordField1 = new javax.swing.JPasswordField();
        jLabel70 = new javax.swing.JLabel();
        jPasswordField3 = new javax.swing.JPasswordField();
        jLabel71 = new javax.swing.JLabel();
        users = new javax.swing.JComboBox();
        jLabel72 = new javax.swing.JLabel();
        jButton25 = new javax.swing.JButton();
        jButton24 = new javax.swing.JButton();
        jTextField3 = new javax.swing.JTextField();
        jButton10 = new javax.swing.JButton();
        jScrollPane3 = new javax.swing.JScrollPane();
        jList2 = new javax.swing.JList();
        jLabel4 = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        jLabel47 = new javax.swing.JLabel();
        jLabel48 = new javax.swing.JLabel();
        jLabel98 = new javax.swing.JLabel();
        jLabel102 = new javax.swing.JLabel();
        jLabel103 = new javax.swing.JLabel();
        jLabel104 = new javax.swing.JLabel();
        jLabel105 = new javax.swing.JLabel();
        jLabel106 = new javax.swing.JLabel();
        jLabel97 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        jTabbedPane5 = new javax.swing.JTabbedPane();
        jPanel44 = new javax.swing.JPanel();
        jSplitPane1 = new javax.swing.JSplitPane();
        jPanel37 = new javax.swing.JPanel();
        jLabel84 = new javax.swing.JLabel();
        jScrollPane10 = new javax.swing.JScrollPane();
        jList1 = new javax.swing.JList();
        jButton15 = new javax.swing.JButton();
        jPanel38 = new javax.swing.JPanel();
        jLabel85 = new javax.swing.JLabel();
        jLabel86 = new javax.swing.JLabel();
        jLabel87 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel58 = new javax.swing.JLabel();
        jLabel59 = new javax.swing.JLabel();
        jLabel108 = new javax.swing.JLabel();
        jLabel109 = new javax.swing.JLabel();
        jPanel18 = new javax.swing.JPanel();
        jPanel45 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jComboBox5 = new javax.swing.JComboBox();
        jLabel7 = new javax.swing.JLabel();
        jLabel100 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jSpinner1 = new javax.swing.JSpinner();
        jButton9 = new javax.swing.JButton();
        jLabel101 = new javax.swing.JLabel();
        jComboBox9 = new javax.swing.JComboBox();
        check = new javax.swing.JCheckBox();
        jLabel99 = new javax.swing.JLabel();
        jLabel107 = new javax.swing.JLabel();
        jPanel20 = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        jButton11 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jTabbedPane4 = new javax.swing.JTabbedPane();
        jPanel13 = new javax.swing.JPanel();
        jLabel51 = new javax.swing.JLabel();
        jScrollPane7 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jButton18 = new javax.swing.JButton();
        jButton19 = new javax.swing.JButton();
        jButton20 = new javax.swing.JButton();
        jButton21 = new javax.swing.JButton();
        jScrollPane8 = new javax.swing.JScrollPane();
        jTable6 = new javax.swing.JTable();
        jLabel52 = new javax.swing.JLabel();
        jPanel15 = new javax.swing.JPanel();
        jLabel45 = new javax.swing.JLabel();
        jTextField7 = new javax.swing.JTextField();
        jTextField9 = new javax.swing.JTextField();
        jLabel46 = new javax.swing.JLabel();
        jButton14 = new javax.swing.JButton();
        jPanel14 = new javax.swing.JPanel();
        jTextField17 = new javax.swing.JTextField();
        jLabel56 = new javax.swing.JLabel();
        jLabel55 = new javax.swing.JLabel();
        jTextField18 = new javax.swing.JTextField();
        jTextField19 = new javax.swing.JTextField();
        jTextField20 = new javax.swing.JTextField();
        jLabel53 = new javax.swing.JLabel();
        jLabel54 = new javax.swing.JLabel();
        jPanel16 = new javax.swing.JPanel();
        jTabbedPane2 = new javax.swing.JTabbedPane();
        jPanel21 = new javax.swing.JPanel();
        jPanel35 = new javax.swing.JPanel();
        person1 = new javax.swing.JTextField();
        nomm1 = new javax.swing.JTextField();
        jLabel73 = new javax.swing.JLabel();
        jLabel74 = new javax.swing.JLabel();
        jTextField27 = new javax.swing.JTextField();
        jLabel75 = new javax.swing.JLabel();
        jLabel76 = new javax.swing.JLabel();
        person2 = new javax.swing.JTextField();
        jLabel77 = new javax.swing.JLabel();
        jLabel78 = new javax.swing.JLabel();
        jTextField28 = new javax.swing.JTextField();
        jComboBox6 = new javax.swing.JComboBox();
        jLabel79 = new javax.swing.JLabel();
        jLabel80 = new javax.swing.JLabel();
        jTextField29 = new javax.swing.JTextField();
        jLabel81 = new javax.swing.JLabel();
        jTextField30 = new javax.swing.JTextField();
        jComboBox7 = new javax.swing.JComboBox();
        jLabel82 = new javax.swing.JLabel();
        jTextField31 = new javax.swing.JTextField();
        jComboBox8 = new javax.swing.JComboBox();
        jComboBox2 = new javax.swing.JComboBox();
        jPanel34 = new javax.swing.JPanel();
        col2 = new javax.swing.JTextField();
        jLabel60 = new javax.swing.JLabel();
        jLabel61 = new javax.swing.JLabel();
        nom3 = new javax.swing.JTextField();
        jLabel64 = new javax.swing.JLabel();
        jTextField22 = new javax.swing.JTextField();
        jTextField23 = new javax.swing.JTextField();
        jLabel65 = new javax.swing.JLabel();
        jLabel66 = new javax.swing.JLabel();
        nom5 = new javax.swing.JTextField();
        jScrollPane6 = new javax.swing.JScrollPane();
        jTable8 = new javax.swing.JTable();
        jButton34 = new javax.swing.JButton();
        jButton33 = new javax.swing.JButton();
        jButton32 = new javax.swing.JButton();
        jLabel83 = new javax.swing.JLabel();
        jButton31 = new javax.swing.JButton();
        jPanel27 = new javax.swing.JPanel();
        jPanel33 = new javax.swing.JPanel();
        jTextField24 = new javax.swing.JTextField();
        jLabel62 = new javax.swing.JLabel();
        jLabel63 = new javax.swing.JLabel();
        jTextField26 = new javax.swing.JTextField();
        jScrollPane5 = new javax.swing.JScrollPane();
        jTable5 = new javax.swing.JTable();
        jButton23 = new javax.swing.JButton();
        jButton26 = new javax.swing.JButton();
        jButton27 = new javax.swing.JButton();
        jButton28 = new javax.swing.JButton();
        jLabel44 = new javax.swing.JLabel();
        jLabel50 = new javax.swing.JLabel();
        jButton16 = new javax.swing.JButton();
        jButton36 = new javax.swing.JButton();
        jButton44 = new javax.swing.JButton();
        jLabel93 = new javax.swing.JLabel();
        recibe = new javax.swing.JLabel();
        jLabel110 = new javax.swing.JLabel();
        fondo = new javax.swing.JLabel();

        Editar.setText("Editar");
        Editar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                EditarActionPerformed(evt);
            }
        });
        Opciones_tabla.add(Editar);

        Eliminar.setText("Eliminar");
        Eliminar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                EliminarActionPerformed(evt);
            }
        });
        Opciones_tabla.add(Eliminar);

        foto.setText("Ingresar imagen");
        foto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                fotoActionPerformed(evt);
            }
        });
        Menu_foto.add(foto);

        jMenuItem1.setText("Ingresar imagen");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        foto_producto.add(jMenuItem1);

        Editar1.setText("Editar");
        Editar1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Editar1ActionPerformed(evt);
            }
        });
        tabla_producto.add(Editar1);

        Eliminar1.setText("Eliminar");
        Eliminar1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Eliminar1ActionPerformed(evt);
            }
        });
        tabla_producto.add(Eliminar1);

        Editar_empleo.setText("Editar");
        Editar_empleo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Editar_empleoActionPerformed(evt);
            }
        });
        Tabla_Empleos.add(Editar_empleo);

        Eliminar_empleo.setText("Eliminar");
        Eliminar_empleo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Eliminar_empleoActionPerformed(evt);
            }
        });
        Tabla_Empleos.add(Eliminar_empleo);

        Dialogo_Buscar.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        Dialogo_Buscar.setTitle("Busqueda de producto");

        jButton38.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/buscar.png"))); // NOI18N
        jButton38.setBorderPainted(false);
        jButton38.setContentAreaFilled(false);
        jButton38.setDefaultCapable(false);
        jButton38.setFocusPainted(false);
        jButton38.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton38ActionPerformed(evt);
            }
        });

        jTextField16.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField16KeyTyped(evt);
            }
        });

        jLabel90.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel90.setText("BUSCAR");

        jTable9.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane11.setViewportView(jTable9);

        jButton39.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/añadir.png"))); // NOI18N
        jButton39.setText("AGREGAR");
        jButton39.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton39ActionPerformed(evt);
            }
        });

        jButton40.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/cancelar.png"))); // NOI18N
        jButton40.setText("CANCELAR");
        jButton40.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton40ActionPerformed(evt);
            }
        });

        jLabel92.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel92.setText("CANTIDAD");

        jSpinner3.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
        jSpinner3.setModel(new javax.swing.SpinnerNumberModel(1, 1, 100, 1));

        javax.swing.GroupLayout Dialogo_BuscarLayout = new javax.swing.GroupLayout(Dialogo_Buscar.getContentPane());
        Dialogo_Buscar.getContentPane().setLayout(Dialogo_BuscarLayout);
        Dialogo_BuscarLayout.setHorizontalGroup(
            Dialogo_BuscarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(Dialogo_BuscarLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(Dialogo_BuscarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 714, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(Dialogo_BuscarLayout.createSequentialGroup()
                        .addComponent(jLabel90)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField16, javax.swing.GroupLayout.PREFERRED_SIZE, 386, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jButton38))
                    .addGroup(Dialogo_BuscarLayout.createSequentialGroup()
                        .addComponent(jLabel92)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(27, 27, 27)
                        .addComponent(jButton39)
                        .addGap(43, 43, 43)
                        .addComponent(jButton40)))
                .addContainerGap(21, Short.MAX_VALUE))
        );
        Dialogo_BuscarLayout.setVerticalGroup(
            Dialogo_BuscarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(Dialogo_BuscarLayout.createSequentialGroup()
                .addGroup(Dialogo_BuscarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(Dialogo_BuscarLayout.createSequentialGroup()
                        .addGap(31, 31, 31)
                        .addGroup(Dialogo_BuscarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel90)
                            .addComponent(jTextField16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(Dialogo_BuscarLayout.createSequentialGroup()
                        .addGap(21, 21, 21)
                        .addComponent(jButton38)))
                .addGap(32, 32, 32)
                .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 237, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(Dialogo_BuscarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton39)
                    .addComponent(jButton40)
                    .addComponent(jLabel92)
                    .addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jButton42.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/cancelar.png"))); // NOI18N
        jButton42.setText("Cancelar");
        jButton42.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton42ActionPerformed(evt);
            }
        });

        jButton43.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/editar.png"))); // NOI18N
        jButton43.setText("Ingresar nota");
        jButton43.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton43ActionPerformed(evt);
            }
        });

        precio_cobrar.setBackground(new java.awt.Color(0, 51, 255));
        precio_cobrar.setFont(new java.awt.Font("Tahoma", 1, 60)); // NOI18N
        precio_cobrar.setForeground(new java.awt.Color(0, 51, 204));
        precio_cobrar.setText("                 ");

        jLabel89.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
        jLabel89.setText("TOTAL A COBRAR");

        jLabel94.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel94.setText("Pagó con:");

        jLabel95.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel95.setText("Su cambio:");

        jTextField21.setFont(new java.awt.Font("Tahoma", 3, 24)); // NOI18N
        jTextField21.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTextField21KeyPressed(evt);
            }
        });

        jLabel96.setFont(new java.awt.Font("Tahoma", 3, 24)); // NOI18N
        jLabel96.setText(" 0");

        precio_cobrar1.setBackground(new java.awt.Color(0, 51, 255));
        precio_cobrar1.setFont(new java.awt.Font("Tahoma", 1, 60)); // NOI18N
        precio_cobrar1.setForeground(new java.awt.Color(0, 51, 204));
        precio_cobrar1.setText("$");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(41, 41, 41)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel95)
                            .addComponent(jLabel94))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel96, javax.swing.GroupLayout.DEFAULT_SIZE, 235, Short.MAX_VALUE)
                            .addComponent(jTextField21, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jLabel89)
                        .addGroup(jPanel4Layout.createSequentialGroup()
                            .addComponent(precio_cobrar1)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(precio_cobrar, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel89)
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(precio_cobrar, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(precio_cobrar1, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel94)
                    .addComponent(jTextField21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(26, 26, 26)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel96)
                    .addComponent(jLabel95))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/icnono_ventas.png"))); // NOI18N
        jButton7.setText("Cobrar");
        jButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton7ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout Dialogo_CobrarLayout = new javax.swing.GroupLayout(Dialogo_Cobrar.getContentPane());
        Dialogo_Cobrar.getContentPane().setLayout(Dialogo_CobrarLayout);
        Dialogo_CobrarLayout.setHorizontalGroup(
            Dialogo_CobrarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(Dialogo_CobrarLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(Dialogo_CobrarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(Dialogo_CobrarLayout.createSequentialGroup()
                        .addGroup(Dialogo_CobrarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jButton7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButton42, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(36, 36, 36))
                    .addGroup(Dialogo_CobrarLayout.createSequentialGroup()
                        .addComponent(jButton43, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap())))
        );
        Dialogo_CobrarLayout.setVerticalGroup(
            Dialogo_CobrarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(Dialogo_CobrarLayout.createSequentialGroup()
                .addGroup(Dialogo_CobrarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(Dialogo_CobrarLayout.createSequentialGroup()
                        .addGap(72, 72, 72)
                        .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(31, 31, 31)
                        .addComponent(jButton42)
                        .addGap(37, 37, 37)
                        .addComponent(jButton43))
                    .addGroup(Dialogo_CobrarLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );

        Delete.setText("Eliminar producto");
        Delete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                DeleteActionPerformed(evt);
            }
        });
        Menu_lista_almacen.add(Delete);

        Editar_lista.setText("Editar");
        Editar_lista.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Editar_listaActionPerformed(evt);
            }
        });
        lista_Usuarios.add(Editar_lista);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setUndecorated(true);
        addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                formKeyPressed(evt);
            }
        });
        getContentPane().setLayout(null);

        jTabbedPane1.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);
        jTabbedPane1.setToolTipText("Eliga lo que desee realizar");
        jTabbedPane1.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jTabbedPane1.setName(""); // NOI18N
        jTabbedPane1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTabbedPane1MouseClicked(evt);
            }
        });
        jTabbedPane1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTabbedPane1KeyPressed(evt);
            }
        });

        jPanel1.setBackground(new java.awt.Color(204, 255, 255));
        jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jPanel1KeyPressed(evt);
            }
        });

        TICKET1.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);
        TICKET1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                TICKET1MouseClicked(evt);
            }
        });

        jPanel7.setBackground(new java.awt.Color(204, 255, 255));

        jTable1.setBackground(new java.awt.Color(204, 255, 255));
        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jTable1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTable1KeyPressed(evt);
            }
        });
        jScrollPane1.setViewportView(jTable1);

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 58)); // NOI18N
        jLabel2.setText("$");

        jPanel8.setBackground(new java.awt.Color(204, 255, 255));
        jPanel8.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/icnono_ventas.png"))); // NOI18N
        jButton8.setText("COBRAR");
        jButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton8ActionPerformed(evt);
            }
        });

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N
        jLabel3.setText("PRODUCTOS EN LA VENTA ACTUAL");

        jLabel88.setFont(new java.awt.Font("Tahoma", 1, 30)); // NOI18N
        jLabel88.setText("0");

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap(100, Short.MAX_VALUE)
                .addComponent(jLabel88, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 364, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(24, 24, 24)
                .addComponent(jButton8)
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButton8, javax.swing.GroupLayout.Alignment.TRAILING, 0, 0, Short.MAX_VALUE)
                    .addComponent(jLabel88, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel3))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel49.setFont(new java.awt.Font("Tahoma", 1, 58)); // NOI18N

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1338, Short.MAX_VALUE)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(16, 16, 16)
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel49, javax.swing.GroupLayout.PREFERRED_SIZE, 237, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(361, Short.MAX_VALUE))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 313, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap(46, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                        .addComponent(jLabel49, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(62, 62, 62))))
        );

        TICKET1.addTab("VENTAS ", jPanel7);

        jPanel31.setBackground(new java.awt.Color(204, 255, 255));

        jLabel91.setText("CONSULTAR POR:");

        jTable10.setBackground(new java.awt.Color(204, 255, 255));
        jTable10.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane12.setViewportView(jTable10);

        jButton37.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/buscar.png"))); // NOI18N
        jButton37.setBorderPainted(false);
        jButton37.setContentAreaFilled(false);
        jButton37.setDefaultCapable(false);
        jButton37.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton37ActionPerformed(evt);
            }
        });

        jComboBox4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "PRODUCTO", "USUARIO", "FECHA DE VENTA" }));

        jTextField12.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField12KeyTyped(evt);
            }
        });

        jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/borrar.png"))); // NOI18N
        jButton5.setBorderPainted(false);
        jButton5.setContentAreaFilled(false);
        jButton5.setDefaultCapable(false);
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        jLabel9.setFont(new java.awt.Font("Tahoma", 3, 24)); // NOI18N
        jLabel9.setText("TOTAL:");

        jLabel10.setFont(new java.awt.Font("Tahoma", 3, 24)); // NOI18N
        jLabel10.setText("TOTAL DE VENTAS REALIZADAS:");

        jLabel11.setFont(new java.awt.Font("Tahoma", 3, 24)); // NOI18N

        jLabel12.setFont(new java.awt.Font("Tahoma", 3, 24)); // NOI18N

        javax.swing.GroupLayout jPanel31Layout = new javax.swing.GroupLayout(jPanel31);
        jPanel31.setLayout(jPanel31Layout);
        jPanel31Layout.setHorizontalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel31Layout.createSequentialGroup()
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel31Layout.createSequentialGroup()
                        .addGap(74, 74, 74)
                        .addComponent(jLabel91)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jComboBox4, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton37)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton5))
                    .addGroup(jPanel31Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 1318, Short.MAX_VALUE)))
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel31Layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(23, 23, 23))
        );
        jPanel31Layout.setVerticalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel31Layout.createSequentialGroup()
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel31Layout.createSequentialGroup()
                        .addGap(17, 17, 17)
                        .addComponent(jLabel91))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel31Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButton37, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jComboBox4)
                                .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane12, javax.swing.GroupLayout.PREFERRED_SIZE, 287, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel31Layout.createSequentialGroup()
                        .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(jLabel9)))
                .addGap(26, 26, 26))
        );

        TICKET1.addTab("VENTA POR PERÍODO", jPanel31);

        jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/buscar.png"))); // NOI18N
        jButton3.setText("BUSCAR");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/cerrar.png"))); // NOI18N
        jButton6.setText("BORRAR ARTÍCULO");
        jButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton6ActionPerformed(evt);
            }
        });
        jButton6.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jButton6KeyPressed(evt);
            }
        });

        jTextField1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTextField1KeyPressed(evt);
            }
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField1KeyTyped(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel1.setText("NOMBRE DE PRODUCTO:");

        jButton22.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/añadir.png"))); // NOI18N
        jButton22.setText("ENTER - AGREGAR PRODUCTO");
        jButton22.setBorderPainted(false);
        jButton22.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jButton22.setDefaultCapable(false);
        jButton22.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton22ActionPerformed(evt);
            }
        });
        jButton22.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jButton22KeyPressed(evt);
            }
        });

        jLabel57.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel57.setText("CANTIDAD:");

        jTextField32.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTextField32KeyPressed(evt);
            }
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField32KeyTyped(evt);
            }
        });

        jButton35.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/IMPRIMIR.jpg"))); // NOI18N
        jButton35.setText("IMPRIMIR DATOS DE TABLA");
        jButton35.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton35ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(22, 22, 22)
                                .addComponent(jLabel1)))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(24, 24, 24)
                                .addComponent(jLabel57))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextField32, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jButton35)
                                    .addComponent(jButton22)))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(56, 56, 56)
                        .addComponent(jButton6)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(TICKET1)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel57)
                    .addComponent(jLabel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton22, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(22, 22, 22)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton3)
                    .addComponent(jButton35)
                    .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TICKET1, javax.swing.GroupLayout.PREFERRED_SIZE, 476, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(117, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("F1 VENTAS", jPanel1);

        jPanel2.setBackground(new java.awt.Color(204, 255, 255));

        jTabbedPane3.setBackground(new java.awt.Color(204, 255, 255));
        jTabbedPane3.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);

        jPanel9.setBackground(new java.awt.Color(204, 255, 255));

        jLabel30.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
        jLabel30.setText("           Ingrese fotografía");
        jLabel30.setToolTipText("");
        jLabel30.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        jLabel30.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLabel30.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel30MouseClicked(evt);
            }
        });

        jPanel23.setBackground(new java.awt.Color(204, 255, 255));
        jPanel23.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2), "REGISTRO_PERSONALES"));

        id_persona.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                id_personaKeyTyped(evt);
            }
        });

        jLabel17.setText("RFC");

        jLabel18.setText("TIPO");

        jLabel19.setText("NOMBRE");

        jLabel20.setText("APELLIDOS");

        jTextField4.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField4KeyTyped(evt);
            }
        });

        jTextField6.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField6KeyTyped(evt);
            }
        });

        personas.setFont(new java.awt.Font("Tahoma", 2, 11)); // NOI18N
        personas.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ADMINISTRADOR", "PROVEEDOR", "CLIENTE", "TRABAJADOR" }));
        personas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                personasActionPerformed(evt);
            }
        });

        jLabel22.setText("CORREO ELECTRONICO");

        correo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "@hotmail.com", "@live.com", "@gmail.com", "@outlook.com", "@yahoo.com", "@facebook.com", "@twitter.com" }));
        correo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                correoActionPerformed(evt);
            }
        });

        jLabel21.setText("SEXO");

        jLabel23.setBackground(new java.awt.Color(204, 255, 255));
        jLabel23.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel23.setText("TELÉFONO");

        tel.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                telKeyTyped(evt);
            }
        });

        jComboBox10.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione", "HOMBRE", "MUJER" }));

        javax.swing.GroupLayout jPanel23Layout = new javax.swing.GroupLayout(jPanel23);
        jPanel23.setLayout(jPanel23Layout);
        jPanel23Layout.setHorizontalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel23Layout.createSequentialGroup()
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel23Layout.createSequentialGroup()
                        .addGap(107, 107, 107)
                        .addComponent(jLabel17)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(id_persona, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel23Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel23)
                            .addComponent(jLabel22)
                            .addComponent(jLabel20)
                            .addComponent(jLabel19)
                            .addComponent(jLabel18)
                            .addComponent(jLabel21))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(jTextField6)
                                .addGroup(jPanel23Layout.createSequentialGroup()
                                    .addComponent(jTextField33, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(correo, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addComponent(jTextField4)
                                .addComponent(personas, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(tel, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jComboBox10, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(17, Short.MAX_VALUE))
        );
        jPanel23Layout.setVerticalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel23Layout.createSequentialGroup()
                .addGap(33, 33, 33)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(id_persona, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel17))
                .addGap(44, 44, 44)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(personas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel18))
                .addGap(49, 49, 49)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel20))
                .addGap(46, 46, 46)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(correo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(47, 47, 47)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(jComboBox10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(39, 39, 39)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(tel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel23))
                .addGap(88, 88, 88))
        );

        jPanel24.setBackground(new java.awt.Color(204, 255, 255));
        jPanel24.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2), "DIRECCIÓN"));

        jLabel24.setText("NOMBRE CIUDAD");

        nom.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nomActionPerformed(evt);
            }
        });
        nom.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                nomKeyTyped(evt);
            }
        });

        col.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                colActionPerformed(evt);
            }
        });
        col.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                colKeyTyped(evt);
            }
        });

        jTextField8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField8ActionPerformed(evt);
            }
        });
        jTextField8.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTextField8KeyPressed(evt);
            }
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField8KeyTyped(evt);
            }
        });

        jLabel25.setText("NUMERO CALLE");

        jLabel26.setText("NOMBRE COLONIA");

        jTextField10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField10ActionPerformed(evt);
            }
        });
        jTextField10.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField10KeyTyped(evt);
            }
        });

        jLabel27.setText("NOMBRE CALLE");

        estados.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Aguascalientes", "Baja California", "Baja California Sur", "Campeche", "Chiapas", "Chihuahua", "Coahuila", "Colima", "Distrito Federal", "Durango", "Estado de México", "Guanajuato", "Guerrero", "Hidalgo", "Jalisco", "Mechoacán", "Morelos", "Nayarit", "Nuevo León", "Oaxaca", "Puebla", "Querétaro", "Quintana Roo", "San Luis Potosí", "Sinaloa", "Sonora", "Tabasco", "Tamaulipas", "Tlaxcala", "Veracruz", "Yucatan", "Zacatecas" }));
        estados.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                estadosKeyTyped(evt);
            }
        });

        jLabel28.setText("NOMBRE ESTADO");

        javax.swing.GroupLayout jPanel24Layout = new javax.swing.GroupLayout(jPanel24);
        jPanel24.setLayout(jPanel24Layout);
        jPanel24Layout.setHorizontalGroup(
            jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel24Layout.createSequentialGroup()
                .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel24Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel24Layout.createSequentialGroup()
                                .addComponent(jLabel28)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(estados, 0, 249, Short.MAX_VALUE))
                            .addGroup(jPanel24Layout.createSequentialGroup()
                                .addComponent(jLabel24)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(nom, javax.swing.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE))
                            .addGroup(jPanel24Layout.createSequentialGroup()
                                .addComponent(jLabel26)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(col, javax.swing.GroupLayout.DEFAULT_SIZE, 249, Short.MAX_VALUE))))
                    .addGroup(jPanel24Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel24Layout.createSequentialGroup()
                                .addComponent(jLabel25)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel24Layout.createSequentialGroup()
                                .addComponent(jLabel27)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextField10, javax.swing.GroupLayout.DEFAULT_SIZE, 249, Short.MAX_VALUE)))))
                .addContainerGap())
        );
        jPanel24Layout.setVerticalGroup(
            jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel24Layout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel28)
                    .addComponent(estados, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(39, 39, 39)
                .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(nom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel24))
                .addGap(39, 39, 39)
                .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(col, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(40, 40, 40)
                .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel27)
                    .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(40, 40, 40)
                .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel25)
                    .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(101, Short.MAX_VALUE))
        );

        jButton13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/añadir.png"))); // NOI18N
        jButton13.setText("GUARDAR CLIENTE ");
        jButton13.setBorderPainted(false);
        jButton13.setContentAreaFilled(false);
        jButton13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton13ActionPerformed(evt);
            }
        });

        jLabel29.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
        jLabel29.setText("Llene la siguiente informacion acerca de la persona");

        jButton17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/cancelar.png"))); // NOI18N
        jButton17.setText("CANCELAR");
        jButton17.setBorderPainted(false);
        jButton17.setContentAreaFilled(false);
        jButton17.setDefaultCapable(false);

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel29)
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addComponent(jPanel23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jPanel24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel9Layout.createSequentialGroup()
                                .addComponent(jButton13)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton17))
                            .addGroup(jPanel9Layout.createSequentialGroup()
                                .addGap(17, 17, 17)
                                .addComponent(jLabel30, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap(195, Short.MAX_VALUE))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel29)
                .addGap(18, 18, 18)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addComponent(jLabel30, javax.swing.GroupLayout.PREFERRED_SIZE, 206, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(44, 44, 44)
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton13)
                            .addComponent(jButton17)))
                    .addComponent(jPanel23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(34, Short.MAX_VALUE))
        );

        jTabbedPane3.addTab("NUEVO", jPanel9);

        jPanel10.setBackground(new java.awt.Color(204, 255, 255));

        jLabel31.setText("INGRESE RFC :");

        RFC.setEditable(false);

        jLabel32.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
        jLabel32.setToolTipText("");
        jLabel32.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        jLabel32.setComponentPopupMenu(Menu_foto);
        jLabel32.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLabel32.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel32MouseClicked(evt);
            }
        });

        jPanel25.setBackground(new java.awt.Color(204, 255, 255));
        jPanel25.setBorder(javax.swing.BorderFactory.createTitledBorder("Modificar"));

        person.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                personKeyTyped(evt);
            }
        });

        nomm.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                nommKeyTyped(evt);
            }
        });

        jLabel33.setText("Nombre:");

        jLabel34.setText("Teléfono:");

        sex.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                sexKeyTyped(evt);
            }
        });

        jLabel35.setText("Sexo:");

        jLabel41.setText("Apellidos");

        nom2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nom2ActionPerformed(evt);
            }
        });
        nom2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                nom2KeyTyped(evt);
            }
        });

        jLabel39.setText("Nombre calle:");

        jTextField15.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField15ActionPerformed(evt);
            }
        });
        jTextField15.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField15KeyTyped(evt);
            }
        });

        col1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                col1ActionPerformed(evt);
            }
        });
        col1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                col1KeyTyped(evt);
            }
        });

        jLabel38.setText("Nombre colonia:");

        jLabel42.setText("Nombre ciudad:");

        jLabel36.setText("Correo electrónico:");

        jTextField14.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField14ActionPerformed(evt);
            }
        });
        jTextField14.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField14KeyTyped(evt);
            }
        });

        jLabel40.setText("Número calle:");

        jLabel37.setText("Nombre estado:");

        nom1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nom1ActionPerformed(evt);
            }
        });
        nom1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                nom1KeyTyped(evt);
            }
        });

        javax.swing.GroupLayout jPanel25Layout = new javax.swing.GroupLayout(jPanel25);
        jPanel25.setLayout(jPanel25Layout);
        jPanel25Layout.setHorizontalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel25Layout.createSequentialGroup()
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel25Layout.createSequentialGroup()
                        .addComponent(jLabel34)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel25Layout.createSequentialGroup()
                        .addGap(24, 24, 24)
                        .addComponent(jLabel35)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(sex))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel25Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel25Layout.createSequentialGroup()
                                .addComponent(jLabel41)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(nomm, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel25Layout.createSequentialGroup()
                                .addComponent(jLabel33)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(person, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addGap(62, 62, 62)
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel36)
                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel42)
                        .addComponent(jLabel37)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21, Short.MAX_VALUE)
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jTextField13)
                    .addComponent(nom1)
                    .addComponent(nom2, javax.swing.GroupLayout.PREFERRED_SIZE, 212, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(46, 46, 46)
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel38, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel40, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel39, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(col1, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jTextField15, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(140, 140, 140))
        );
        jPanel25Layout.setVerticalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel25Layout.createSequentialGroup()
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel25Layout.createSequentialGroup()
                        .addGap(47, 47, 47)
                        .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(nomm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel41)))
                    .addGroup(jPanel25Layout.createSequentialGroup()
                        .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(person, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel33))
                        .addGap(75, 75, 75)
                        .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel35)
                            .addComponent(sex, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel25Layout.createSequentialGroup()
                        .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel25Layout.createSequentialGroup()
                                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(col1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel38)
                                    .addComponent(jLabel36))
                                .addGap(27, 27, 27)
                                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(nom1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jLabel39))))
                            .addComponent(jLabel37))
                        .addGap(28, 28, 28)
                        .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(nom2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel40)
                            .addComponent(jTextField15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel25Layout.createSequentialGroup()
                        .addGap(95, 95, 95)
                        .addComponent(jLabel42)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel34))
                .addContainerGap())
        );

        Eliminar_registros.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/borrar.png"))); // NOI18N
        Eliminar_registros.setContentAreaFilled(false);
        Eliminar_registros.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        Eliminar_registros.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Eliminar_registrosActionPerformed(evt);
            }
        });

        Actualizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/update2.png"))); // NOI18N
        Actualizar.setBorderPainted(false);
        Actualizar.setContentAreaFilled(false);
        Actualizar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        Actualizar.setDefaultCapable(false);
        Actualizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ActualizarActionPerformed(evt);
            }
        });

        Buscar.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
        Buscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/buscar.png"))); // NOI18N
        Buscar.setBorderPainted(false);
        Buscar.setContentAreaFilled(false);
        Buscar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        Buscar.setDefaultCapable(false);
        Buscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BuscarActionPerformed(evt);
            }
        });

        jTable4.setBackground(new java.awt.Color(204, 255, 255));
        jTable4.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "CODIGO", "DESCRIPCION DEL PRODUCTO", "PRECIO VENTA", "CANTIDAD", "IMPORTE", "EXISTENCIA"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                true, true, true, false, true, true
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTable4.setComponentPopupMenu(Opciones_tabla);
        jTable4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTable4MouseClicked(evt);
            }
        });
        jScrollPane4.setViewportView(jTable4);

        jPanel26.setBackground(new java.awt.Color(204, 255, 255));
        jPanel26.setBorder(javax.swing.BorderFactory.createTitledBorder("CONSULTAS"));

        jLabel43.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel43.setText("Buscar por:");

        jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "NOMBRE", "TIPO PERSONA" }));

        jTextField5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField5ActionPerformed(evt);
            }
        });
        jTextField5.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField5KeyTyped(evt);
            }
        });

        javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26);
        jPanel26.setLayout(jPanel26Layout);
        jPanel26Layout.setHorizontalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel26Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel43)
                .addGap(18, 18, 18)
                .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(38, 38, 38)
                .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 283, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(46, Short.MAX_VALUE))
        );
        jPanel26Layout.setVerticalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel26Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel43)
                    .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(64, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(jLabel31)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(RFC, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(jLabel32, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(57, 57, 57)
                        .addComponent(jPanel26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jPanel25, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1159, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(Actualizar)
                            .addComponent(Eliminar_registros, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(Buscar, javax.swing.GroupLayout.Alignment.TRAILING))))
                .addContainerGap(98, Short.MAX_VALUE))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(RFC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel31))
                        .addGap(13, 13, 13)
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel32, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jPanel25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addGap(207, 207, 207)
                        .addComponent(Buscar)
                        .addGap(28, 28, 28)
                        .addComponent(Actualizar)
                        .addGap(18, 18, 18)
                        .addComponent(Eliminar_registros)))
                .addContainerGap(87, Short.MAX_VALUE))
        );

        jTabbedPane3.addTab("CONSULTAS", jPanel10);

        jPanel11.setBackground(new java.awt.Color(204, 255, 255));

        jPanel5.setBackground(new java.awt.Color(204, 255, 255));
        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true), "USUARIO"));
        jPanel5.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jComboBox1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBox1ActionPerformed(evt);
            }
        });
        jPanel5.add(jComboBox1, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 50, 295, 32));

        jLabel67.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel67.setText("Cod persona");
        jPanel5.add(jLabel67, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 60, 100, -1));

        nom4.setEditable(false);
        jPanel5.add(nom4, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 120, 295, 31));

        jLabel68.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel68.setText("Nombre ");
        jPanel5.add(jLabel68, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 130, -1, -1));
        jPanel5.add(jTextField25, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 190, 289, 32));

        jLabel69.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel69.setText("Nombre usuario");
        jPanel5.add(jLabel69, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 200, 120, -1));
        jPanel5.add(jPasswordField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 260, 289, 28));

        jLabel70.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel70.setText("Contraseña");
        jPanel5.add(jLabel70, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 260, 90, -1));

        jPasswordField3.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jPasswordField3KeyPressed(evt);
            }
        });
        jPanel5.add(jPasswordField3, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 320, 289, 26));

        jLabel71.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel71.setText("Confirmar contraseña");
        jPanel5.add(jLabel71, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 330, 160, -1));

        users.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ADMINISTRADOR", "INVITADO" }));
        jPanel5.add(users, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 380, 144, 29));

        jLabel72.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel72.setText("Tipo usuario");
        jPanel5.add(jLabel72, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 390, 90, -1));

        jButton25.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/cancelar.png"))); // NOI18N
        jButton25.setText("CANCELAR");
        jButton25.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton25ActionPerformed(evt);
            }
        });
        jPanel5.add(jButton25, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 450, 139, -1));

        jButton24.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/añadir.png"))); // NOI18N
        jButton24.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton24ActionPerformed(evt);
            }
        });
        jPanel5.add(jButton24, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 450, 75, -1));
        jPanel5.add(jTextField3, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 50, 100, 30));

        jButton10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/update2.png"))); // NOI18N
        jButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton10ActionPerformed(evt);
            }
        });
        jPanel5.add(jButton10, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 450, 110, 40));

        jList2.setComponentPopupMenu(lista_Usuarios);
        jList2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jList2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jList2MouseClicked(evt);
            }
        });
        jScrollPane3.setViewportView(jList2);

        jLabel4.setText("USUARIOS REGISTRADOS");

        jPanel6.setBackground(new java.awt.Color(204, 255, 255));
        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos"));

        jLabel47.setText("TIPO DE USUARIO:");

        jLabel48.setText("CONTRASEÑA:");

        jLabel98.setText("FECHA DE REGISTRO");

        jLabel105.setText("CÓDIGO");

        jLabel16.setText("NOMBRE:");

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel98)
                    .addComponent(jLabel48)
                    .addComponent(jLabel47)
                    .addComponent(jLabel105)
                    .addComponent(jLabel16))
                .addGap(18, 18, 18)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel97, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel106, javax.swing.GroupLayout.DEFAULT_SIZE, 247, Short.MAX_VALUE)
                    .addComponent(jLabel104, javax.swing.GroupLayout.DEFAULT_SIZE, 247, Short.MAX_VALUE)
                    .addComponent(jLabel103, javax.swing.GroupLayout.DEFAULT_SIZE, 247, Short.MAX_VALUE)
                    .addComponent(jLabel102, javax.swing.GroupLayout.DEFAULT_SIZE, 247, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGap(31, 31, 31)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel106, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel105))
                .addGap(43, 43, 43)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel47)
                    .addComponent(jLabel102, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(27, 27, 27)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel16)
                    .addComponent(jLabel97, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(60, 60, 60)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel48)
                    .addComponent(jLabel103, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(46, 46, 46)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel98)
                    .addComponent(jLabel104, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(50, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGap(730, 730, 730)
                .addComponent(jLabel4)
                .addContainerGap(494, Short.MAX_VALUE))
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 561, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 226, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(86, 86, 86))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGap(13, 13, 13)
                .addComponent(jLabel4)
                .addGap(18, 18, 18)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 534, Short.MAX_VALUE)
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(55, Short.MAX_VALUE))
        );

        jTabbedPane3.addTab("REGISTRO_USUARIOS", jPanel11);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane3)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 662, Short.MAX_VALUE)
                .addGap(56, 56, 56))
        );

        jTabbedPane1.addTab("F2  REGISTRO DE PERSONAS", jPanel2);

        jPanel12.setBackground(new java.awt.Color(204, 255, 255));

        jTabbedPane5.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);
        jTabbedPane5.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTabbedPane5MouseClicked(evt);
            }
        });

        jPanel44.setBackground(new java.awt.Color(204, 255, 255));

        jSplitPane1.setBackground(new java.awt.Color(204, 255, 255));
        jSplitPane1.setDividerLocation(200);

        jPanel37.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));

        javax.swing.GroupLayout jPanel37Layout = new javax.swing.GroupLayout(jPanel37);
        jPanel37.setLayout(jPanel37Layout);
        jPanel37Layout.setHorizontalGroup(
            jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel84, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 504, Short.MAX_VALUE)
        );
        jPanel37Layout.setVerticalGroup(
            jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel84, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE)
        );

        jSplitPane1.setRightComponent(jPanel37);

        jList1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jList1.setComponentPopupMenu(Menu_lista_almacen);
        jList1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jList1MouseClicked(evt);
            }
        });
        jScrollPane10.setViewportView(jList1);

        jSplitPane1.setLeftComponent(jScrollPane10);

        jButton15.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jButton15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/update2.png"))); // NOI18N
        jButton15.setText("Actualizar");
        jButton15.setBorderPainted(false);
        jButton15.setContentAreaFilled(false);
        jButton15.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jButton15.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton15ActionPerformed(evt);
            }
        });

        jPanel38.setBackground(new java.awt.Color(204, 255, 255));
        jPanel38.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DATOS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Agency FB", 3, 36))); // NOI18N

        jLabel85.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel85.setText("Existencia");

        jLabel86.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel86.setText("Categoria");

        jLabel87.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel87.setText("Descripción");

        jLabel6.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N

        jLabel58.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N

        jLabel59.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N

        jLabel108.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel108.setText("Producto");

        jLabel109.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N

        javax.swing.GroupLayout jPanel38Layout = new javax.swing.GroupLayout(jPanel38);
        jPanel38.setLayout(jPanel38Layout);
        jPanel38Layout.setHorizontalGroup(
            jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel38Layout.createSequentialGroup()
                .addGroup(jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel38Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel85)
                            .addComponent(jLabel87)
                            .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel86)
                            .addComponent(jLabel108)
                            .addComponent(jLabel58, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 226, Short.MAX_VALUE))
                    .addComponent(jLabel59, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 389, Short.MAX_VALUE))
                .addContainerGap())
            .addGroup(jPanel38Layout.createSequentialGroup()
                .addGap(30, 30, 30)
                .addComponent(jLabel109, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel38Layout.setVerticalGroup(
            jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel38Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel108)
                .addGap(18, 18, 18)
                .addComponent(jLabel109, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel86)
                .addGap(26, 26, 26)
                .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel85)
                .addGap(18, 18, 18)
                .addComponent(jLabel58, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(24, 24, 24)
                .addComponent(jLabel87)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)
                .addComponent(jLabel59, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel44Layout = new javax.swing.GroupLayout(jPanel44);
        jPanel44.setLayout(jPanel44Layout);
        jPanel44Layout.setHorizontalGroup(
            jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel44Layout.createSequentialGroup()
                .addGroup(jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel44Layout.createSequentialGroup()
                        .addGap(97, 97, 97)
                        .addComponent(jButton15, javax.swing.GroupLayout.PREFERRED_SIZE, 195, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel44Layout.createSequentialGroup()
                        .addGap(34, 34, 34)
                        .addComponent(jSplitPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 714, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(36, 36, 36)
                        .addComponent(jPanel38, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(155, Short.MAX_VALUE))
        );
        jPanel44Layout.setVerticalGroup(
            jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel44Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(jButton15, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSplitPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 460, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel38, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(154, 154, 154))
        );

        jTabbedPane5.addTab("ALMACEN", jPanel44);

        jPanel18.setBackground(new java.awt.Color(204, 255, 255));

        jPanel45.setBackground(new java.awt.Color(204, 255, 255));
        jPanel45.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)), "AGREGAR"));

        jLabel5.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel5.setText("Codigo del producto");

        jLabel7.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel7.setText("Precio");

        jLabel100.setFont(new java.awt.Font("Tahoma", 3, 24)); // NOI18N

        jLabel8.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel8.setText("Cantidad:");

        jSpinner1.setModel(new javax.swing.SpinnerNumberModel(1, 1, 500, 1));
        jSpinner1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jSpinner1KeyPressed(evt);
            }
        });

        jButton9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/añadir.png"))); // NOI18N
        jButton9.setText("Registrar a inventario");
        jButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton9ActionPerformed(evt);
            }
        });

        jLabel101.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel101.setText("Proveedor");

        jComboBox9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBox9ActionPerformed(evt);
            }
        });

        check.setText("Registrar proveedor");
        check.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                checkMouseClicked(evt);
            }
        });

        jLabel99.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N
        jLabel99.setText("Existencia:");

        jLabel107.setFont(new java.awt.Font("Tahoma", 3, 24)); // NOI18N
        jLabel107.setText("0");

        javax.swing.GroupLayout jPanel45Layout = new javax.swing.GroupLayout(jPanel45);
        jPanel45.setLayout(jPanel45Layout);
        jPanel45Layout.setHorizontalGroup(
            jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel45Layout.createSequentialGroup()
                .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel45Layout.createSequentialGroup()
                        .addGap(82, 82, 82)
                        .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel45Layout.createSequentialGroup()
                                .addComponent(jLabel8)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(2, 2, 2))
                            .addGroup(jPanel45Layout.createSequentialGroup()
                                .addComponent(jLabel101)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jComboBox5, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(check, javax.swing.GroupLayout.DEFAULT_SIZE, 141, Short.MAX_VALUE))
                    .addGroup(jPanel45Layout.createSequentialGroup()
                        .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel45Layout.createSequentialGroup()
                                .addContainerGap()
                                .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(jPanel45Layout.createSequentialGroup()
                                        .addComponent(jLabel5)
                                        .addGap(10, 10, 10)
                                        .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel100, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jComboBox9, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(jPanel45Layout.createSequentialGroup()
                                        .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(jLabel99)
                                            .addComponent(jLabel7))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLabel107, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addGroup(jPanel45Layout.createSequentialGroup()
                                .addGap(149, 149, 149)
                                .addComponent(jButton9)))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel45Layout.setVerticalGroup(
            jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel45Layout.createSequentialGroup()
                .addGap(41, 41, 41)
                .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(jComboBox9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(42, 42, 42)
                .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel100, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7))
                .addGap(42, 42, 42)
                .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel99)
                    .addComponent(jLabel107, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE)
                .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel45Layout.createSequentialGroup()
                        .addGap(21, 21, 21)
                        .addComponent(check))
                    .addGroup(jPanel45Layout.createSequentialGroup()
                        .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel8))
                        .addGap(78, 78, 78)
                        .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jComboBox5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel101))))
                .addGap(60, 60, 60)
                .addComponent(jButton9)
                .addGap(28, 28, 28))
        );

        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
        jPanel18.setLayout(jPanel18Layout);
        jPanel18Layout.setHorizontalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel45, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(836, Short.MAX_VALUE))
        );
        jPanel18Layout.setVerticalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel45, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(175, Short.MAX_VALUE))
        );

        jTabbedPane5.addTab("AGREGAR A INVENTARIO", jPanel18);

        jPanel20.setBackground(new java.awt.Color(204, 255, 255));

        jLabel14.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel14.setText("PRODUCTOS BAJOS EN INVENTARIOS");

        jLabel15.setText("A continuacion se muestra un listado de productos  con inventario debajo de 10 de cantidad ");

        jTable2.setBackground(new java.awt.Color(204, 255, 255));
        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane2.setViewportView(jTable2);

        jButton11.setText("Exportar a excel");
        jButton11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton11ActionPerformed(evt);
            }
        });

        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/buscar.png"))); // NOI18N
        jButton2.setText("CONSULTAR");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
        jPanel20.setLayout(jPanel20Layout);
        jPanel20Layout.setHorizontalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel20Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(jPanel20Layout.createSequentialGroup()
                        .addComponent(jLabel15)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel20Layout.createSequentialGroup()
                            .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 379, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(162, 162, 162)
                            .addComponent(jButton2))
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 972, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(368, Short.MAX_VALUE))
        );
        jPanel20Layout.setVerticalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel20Layout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(jButton2))
                .addGap(23, 23, 23)
                .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(jButton11))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 379, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(174, Short.MAX_VALUE))
        );

        jTabbedPane5.addTab("PRODUCTOS BAJOS EN INVENTARIOS", jPanel20);

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane5)
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jTabbedPane5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("F3 INVENTARIOS", jPanel12);

        jPanel3.setBackground(new java.awt.Color(204, 255, 255));

        jTabbedPane4.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);

        jPanel13.setBackground(new java.awt.Color(204, 255, 255));
        jPanel13.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel51.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jLabel51.setComponentPopupMenu(foto_producto);
        jLabel51.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel51MouseClicked(evt);
            }
        });
        jPanel13.add(jLabel51, new org.netbeans.lib.awtextra.AbsoluteConstraints(750, 10, 240, 190));

        jTextArea1.setColumns(20);
        jTextArea1.setFont(new java.awt.Font("BatangChe", 1, 12)); // NOI18N
        jTextArea1.setRows(5);
        jTextArea1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTextArea1KeyPressed(evt);
            }
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextArea1KeyTyped(evt);
            }
        });
        jScrollPane7.setViewportView(jTextArea1);

        jPanel13.add(jScrollPane7, new org.netbeans.lib.awtextra.AbsoluteConstraints(149, 199, 560, 118));

        jButton18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/borrar.png"))); // NOI18N
        jButton18.setText("ELIMINAR REGISTROS");
        jButton18.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton18ActionPerformed(evt);
            }
        });
        jPanel13.add(jButton18, new org.netbeans.lib.awtextra.AbsoluteConstraints(750, 280, -1, -1));

        jButton19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/buscar.png"))); // NOI18N
        jButton19.setText("CONSULTA");
        jButton19.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton19ActionPerformed(evt);
            }
        });
        jPanel13.add(jButton19, new org.netbeans.lib.awtextra.AbsoluteConstraints(1020, 10, 140, -1));

        jButton20.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/update2.png"))); // NOI18N
        jButton20.setText("ACTUALIZAR");
        jButton20.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton20ActionPerformed(evt);
            }
        });
        jPanel13.add(jButton20, new org.netbeans.lib.awtextra.AbsoluteConstraints(1020, 130, 140, -1));

        jButton21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/añadir.png"))); // NOI18N
        jButton21.setText("AGREGAR");
        jButton21.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton21ActionPerformed(evt);
            }
        });
        jPanel13.add(jButton21, new org.netbeans.lib.awtextra.AbsoluteConstraints(1020, 70, 140, -1));

        jTable6.setBackground(new java.awt.Color(204, 255, 255));
        jTable6.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jTable6.setComponentPopupMenu(tabla_producto);
        jTable6.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTable6MouseClicked(evt);
            }
        });
        jScrollPane8.setViewportView(jTable6);

        jPanel13.add(jScrollPane8, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 370, 970, 180));

        jLabel52.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel52.setText("Descripción");
        jPanel13.add(jLabel52, new org.netbeans.lib.awtextra.AbsoluteConstraints(34, 228, 80, -1));

        jPanel15.setBackground(new java.awt.Color(204, 255, 255));
        jPanel15.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true), "INVENTARIO"));

        jLabel45.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel45.setText("Cantidad máxima:");

        jTextField9.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTextField9KeyPressed(evt);
            }
        });

        jLabel46.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel46.setText("Cantidad mínima:");

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel15Layout.createSequentialGroup()
                        .addComponent(jLabel46)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))
                    .addGroup(jPanel15Layout.createSequentialGroup()
                        .addComponent(jLabel45)
                        .addGap(6, 6, 6)))
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jTextField7, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)
                    .addComponent(jTextField9))
                .addGap(27, 27, 27))
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addGap(42, 42, 42)
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel45)
                    .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(31, 31, 31)
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel46)
                    .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(56, Short.MAX_VALUE))
        );

        jPanel13.add(jPanel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 0, 320, 190));

        jButton14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/nuevo.png"))); // NOI18N
        jButton14.setText("NUEVO");
        jButton14.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton14ActionPerformed(evt);
            }
        });
        jPanel13.add(jButton14, new org.netbeans.lib.awtextra.AbsoluteConstraints(750, 220, -1, -1));

        jPanel14.setBackground(new java.awt.Color(204, 255, 255));
        jPanel14.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true), "PRODUCTO"));

        jTextField17.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jTextField17.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField17ActionPerformed(evt);
            }
        });
        jTextField17.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField17KeyTyped(evt);
            }
        });

        jLabel56.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel56.setText("Producto");

        jLabel55.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel55.setText("Categoría");

        jTextField18.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jTextField18.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField18ActionPerformed(evt);
            }
        });
        jTextField18.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField18KeyTyped(evt);
            }
        });

        jTextField19.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jTextField19.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField19KeyTyped(evt);
            }
        });

        jTextField20.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jTextField20.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTextField20KeyPressed(evt);
            }
        });

        jLabel53.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel53.setText("Precio venta $");

        jLabel54.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel54.setText("Precio compra $");

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGap(40, 40, 40)
                        .addComponent(jLabel56)
                        .addGap(34, 34, 34)
                        .addComponent(jTextField17, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGap(40, 40, 40)
                        .addComponent(jLabel55)
                        .addGap(31, 31, 31)
                        .addComponent(jTextField18, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addComponent(jLabel54, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jTextField19, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGap(11, 11, 11)
                        .addComponent(jLabel53, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jTextField20, javax.swing.GroupLayout.PREFERRED_SIZE, 228, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(jLabel56))
                    .addComponent(jTextField17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(19, 19, 19)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel55)
                    .addComponent(jTextField18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(25, 25, 25)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(jLabel54))
                    .addComponent(jTextField19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(25, 25, 25)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(jLabel53))
                    .addComponent(jTextField20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(16, Short.MAX_VALUE))
        );

        jPanel13.add(jPanel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, 190));

        jTabbedPane4.addTab("NUEVO", jPanel13);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 1335, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 710, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("F4  PRODUCTOS", jPanel3);

        jPanel16.setBackground(new java.awt.Color(204, 255, 255));

        jPanel21.setBackground(new java.awt.Color(204, 255, 255));

        jPanel35.setBackground(new java.awt.Color(204, 255, 255));
        jPanel35.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true), "DATOS PRINCIPALES"));

        person1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                person1KeyTyped(evt);
            }
        });

        nomm1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                nomm1KeyTyped(evt);
            }
        });

        jLabel73.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel73.setText("NOMBRE");

        jLabel74.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel74.setText("SEXO");

        jLabel75.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel75.setText("MSN");

        jLabel76.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel76.setText("APELLIDOS");

        jLabel77.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel77.setText("RFC");

        jLabel78.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel78.setForeground(new java.awt.Color(51, 51, 51));
        jLabel78.setText("SUELDO");

        jTextField28.setEditable(false);

        jComboBox6.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione......." }));
        jComboBox6.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                jComboBox6MousePressed(evt);
            }
        });
        jComboBox6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBox6ActionPerformed(evt);
            }
        });
        jComboBox6.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jComboBox6KeyReleased(evt);
            }
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jComboBox6KeyTyped(evt);
            }
        });

        jLabel79.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel79.setForeground(new java.awt.Color(51, 51, 51));
        jLabel79.setText("CARGO");

        jLabel80.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel80.setText("TELÉFONO");

        jTextField29.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField29KeyTyped(evt);
            }
        });

        jLabel81.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel81.setForeground(new java.awt.Color(51, 51, 51));
        jLabel81.setText("ENTRADA");

        jTextField30.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField30KeyTyped(evt);
            }
        });

        jComboBox7.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "A.M.", "P.M." }));

        jLabel82.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel82.setForeground(new java.awt.Color(51, 51, 51));
        jLabel82.setText("SALIDA");

        jTextField31.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField31KeyTyped(evt);
            }
        });

        jComboBox8.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "P.M.", "A.M." }));
        jComboBox8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBox8ActionPerformed(evt);
            }
        });

        jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SELECCIONE", "HOMBRE", "MUJER" }));

        javax.swing.GroupLayout jPanel35Layout = new javax.swing.GroupLayout(jPanel35);
        jPanel35.setLayout(jPanel35Layout);
        jPanel35Layout.setHorizontalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel35Layout.createSequentialGroup()
                .addGap(32, 32, 32)
                .addComponent(jLabel77)
                .addGap(4, 4, 4)
                .addComponent(person2, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(70, 70, 70)
                .addComponent(jLabel73)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(person1, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(38, 38, 38)
                .addComponent(jLabel76)
                .addGap(11, 11, 11)
                .addComponent(nomm1, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jPanel35Layout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addComponent(jLabel74)
                .addGap(4, 4, 4)
                .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(96, 96, 96)
                .addComponent(jLabel75)
                .addGap(3, 3, 3)
                .addComponent(jTextField27, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(48, 48, 48)
                .addComponent(jLabel80)
                .addGap(10, 10, 10)
                .addComponent(jTextField29, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jPanel35Layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(jLabel79)
                .addGap(4, 4, 4)
                .addComponent(jComboBox6, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(76, 76, 76)
                .addComponent(jLabel78)
                .addGap(2, 2, 2)
                .addComponent(jTextField28, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jPanel35Layout.createSequentialGroup()
                .addGap(2, 2, 2)
                .addComponent(jLabel81)
                .addGap(4, 4, 4)
                .addComponent(jTextField30, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(6, 6, 6)
                .addComponent(jComboBox7, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(76, 76, 76)
                .addComponent(jLabel82)
                .addGap(3, 3, 3)
                .addComponent(jTextField31, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(5, 5, 5)
                .addComponent(jComboBox8, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel35Layout.setVerticalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel35Layout.createSequentialGroup()
                .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel35Layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jLabel77))
                    .addComponent(person2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel35Layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(person1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel73, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel35Layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(jLabel76, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel35Layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(nomm1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(24, 24, 24)
                .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel35Layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jLabel74))
                    .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel35Layout.createSequentialGroup()
                        .addGap(6, 6, 6)
                        .addComponent(jLabel75, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel35Layout.createSequentialGroup()
                        .addGap(6, 6, 6)
                        .addComponent(jTextField27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel35Layout.createSequentialGroup()
                        .addGap(6, 6, 6)
                        .addComponent(jLabel80, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel35Layout.createSequentialGroup()
                        .addGap(6, 6, 6)
                        .addComponent(jTextField29, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(20, 20, 20)
                .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel35Layout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel79, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel35Layout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addComponent(jComboBox6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel78, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField28, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(24, 24, 24)
                .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextField30, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jComboBox7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel35Layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel81)
                            .addComponent(jLabel82, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextField31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jComboBox8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(38, Short.MAX_VALUE))
        );

        jPanel34.setBackground(new java.awt.Color(204, 255, 255));
        jPanel34.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true), "DIRECCIÓN"));
        jPanel34.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        col2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                col2ActionPerformed(evt);
            }
        });
        col2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                col2KeyTyped(evt);
            }
        });
        jPanel34.add(col2, new org.netbeans.lib.awtextra.AbsoluteConstraints(124, 117, 250, -1));

        jLabel60.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel60.setText("Nombre colonia:");
        jPanel34.add(jLabel60, new org.netbeans.lib.awtextra.AbsoluteConstraints(16, 119, -1, -1));

        jLabel61.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel61.setText("Nombre estado:");
        jPanel34.add(jLabel61, new org.netbeans.lib.awtextra.AbsoluteConstraints(16, 30, -1, -1));

        nom3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nom3ActionPerformed(evt);
            }
        });
        nom3.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                nom3KeyTyped(evt);
            }
        });
        jPanel34.add(nom3, new org.netbeans.lib.awtextra.AbsoluteConstraints(121, 28, 250, -1));

        jLabel64.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel64.setText("Nombre calle:");
        jPanel34.add(jLabel64, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 30, -1, -1));

        jTextField22.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField22ActionPerformed(evt);
            }
        });
        jTextField22.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField22KeyTyped(evt);
            }
        });
        jPanel34.add(jTextField22, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 30, 210, -1));

        jTextField23.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField23ActionPerformed(evt);
            }
        });
        jTextField23.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField23KeyTyped(evt);
            }
        });
        jPanel34.add(jTextField23, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 80, 120, -1));

        jLabel65.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel65.setText("Número calle:");
        jPanel34.add(jLabel65, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 80, -1, -1));

        jLabel66.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel66.setText("Nombre ciudad:");
        jPanel34.add(jLabel66, new org.netbeans.lib.awtextra.AbsoluteConstraints(16, 81, -1, -1));

        nom5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nom5ActionPerformed(evt);
            }
        });
        nom5.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                nom5KeyTyped(evt);
            }
        });
        jPanel34.add(nom5, new org.netbeans.lib.awtextra.AbsoluteConstraints(121, 79, 250, -1));

        jTable8.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "", "", "", ""
            }
        ) {
            boolean[] canEdit = new boolean [] {
                true, true, true, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTable8.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTable8MouseClicked(evt);
            }
        });
        jScrollPane6.setViewportView(jTable8);

        jButton34.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/borrar.png"))); // NOI18N
        jButton34.setText("ELIMINAR");

        jButton33.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/update2.png"))); // NOI18N
        jButton33.setText("ACTUALIZAR");

        jButton32.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/añadir.png"))); // NOI18N
        jButton32.setText("INSERTAR");
        jButton32.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton32ActionPerformed(evt);
            }
        });

        jLabel83.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
        jLabel83.setToolTipText("");
        jLabel83.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        jLabel83.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLabel83.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel83MouseClicked(evt);
            }
        });

        jButton31.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/buscar.png"))); // NOI18N
        jButton31.setText("CONSULTAR");

        javax.swing.GroupLayout jPanel21Layout = new javax.swing.GroupLayout(jPanel21);
        jPanel21.setLayout(jPanel21Layout);
        jPanel21Layout.setHorizontalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel21Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1053, Short.MAX_VALUE)
                    .addGroup(jPanel21Layout.createSequentialGroup()
                        .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jPanel34, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 809, Short.MAX_VALUE)
                            .addComponent(jPanel35, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel83, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel21Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jButton33, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButton34, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButton32, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel21Layout.createSequentialGroup()
                        .addGap(26, 26, 26)
                        .addComponent(jButton31, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(99, 99, 99))
        );
        jPanel21Layout.setVerticalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel21Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(jPanel21Layout.createSequentialGroup()
                            .addComponent(jButton31, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGap(18, 18, 18)
                            .addComponent(jButton32)
                            .addGap(18, 18, 18)
                            .addComponent(jButton33)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jButton34))
                        .addComponent(jLabel83, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addComponent(jPanel34, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(20, 20, 20)
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(85, Short.MAX_VALUE))
        );

        jTabbedPane2.addTab("REGISTRO", jPanel21);

        jPanel27.setBackground(new java.awt.Color(204, 255, 255));

        jPanel33.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED), "PUESTO"));

        jTextField24.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField24KeyTyped(evt);
            }
        });

        jLabel62.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
        jLabel62.setText("SUELDO");

        jLabel63.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
        jLabel63.setText("CARGO");

        jTextField26.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTextField26KeyPressed(evt);
            }
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextField26KeyTyped(evt);
            }
        });

        javax.swing.GroupLayout jPanel33Layout = new javax.swing.GroupLayout(jPanel33);
        jPanel33.setLayout(jPanel33Layout);
        jPanel33Layout.setHorizontalGroup(
            jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel33Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel63, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel62))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jTextField26, javax.swing.GroupLayout.DEFAULT_SIZE, 254, Short.MAX_VALUE)
                    .addComponent(jTextField24))
                .addContainerGap(33, Short.MAX_VALUE))
        );
        jPanel33Layout.setVerticalGroup(
            jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel33Layout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addGroup(jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextField26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel63))
                .addGap(34, 34, 34)
                .addGroup(jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextField24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel62))
                .addContainerGap(20, Short.MAX_VALUE))
        );

        jTable5.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
        jTable5.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Título 3"
            }
        ));
        jTable5.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        jTable5.setFocusTraversalPolicyProvider(true);
        jTable5.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTable5MouseClicked(evt);
            }
        });
        jScrollPane5.setViewportView(jTable5);

        jButton23.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/buscar.png"))); // NOI18N
        jButton23.setMnemonic('x');
        jButton23.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton23ActionPerformed(evt);
            }
        });

        jButton26.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/borrar.png"))); // NOI18N
        jButton26.setToolTipText("Eliminar todos los registros");
        jButton26.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton26ActionPerformed(evt);
            }
        });

        jButton27.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/update2.png"))); // NOI18N
        jButton27.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton27ActionPerformed(evt);
            }
        });

        jButton28.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/añadir.png"))); // NOI18N
        jButton28.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton28ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel27Layout = new javax.swing.GroupLayout(jPanel27);
        jPanel27.setLayout(jPanel27Layout);
        jPanel27Layout.setHorizontalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel27Layout.createSequentialGroup()
                .addGap(34, 34, 34)
                .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 754, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(jPanel27Layout.createSequentialGroup()
                            .addComponent(jButton28, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(45, 45, 45)
                            .addComponent(jButton27, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(35, 35, 35)
                            .addComponent(jButton26, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(34, 34, 34)
                            .addComponent(jButton23, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(542, Short.MAX_VALUE))
        );
        jPanel27Layout.setVerticalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel27Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(28, 28, 28)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(35, 35, 35)
                .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton26)
                    .addComponent(jButton23)
                    .addComponent(jButton27, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton28))
                .addContainerGap(153, Short.MAX_VALUE))
        );

        jTabbedPane2.addTab("EMPLEOS", jPanel27);

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane2)
                .addContainerGap())
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane2)
                .addContainerGap())
        );

        jTabbedPane1.addTab("F5 EMPLEADOS", jPanel16);

        getContentPane().add(jTabbedPane1);
        jTabbedPane1.setBounds(0, 81, 1360, 760);

        jLabel44.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        jLabel44.setText("WWW.XION.COM.MX");
        getContentPane().add(jLabel44);
        jLabel44.setBounds(340, 20, 280, 29);
        getContentPane().add(jLabel50);
        jLabel50.setBounds(10, 11, 0, 63);

        jButton16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/sesionn.jpg"))); // NOI18N
        jButton16.setBorderPainted(false);
        jButton16.setContentAreaFilled(false);
        jButton16.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jButton16.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton16ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton16);
        jButton16.setBounds(1290, 50, 65, 40);

        jButton36.setIcon(new javax.swing.ImageIcon(getClass().getResource("/visor/MIN.jpg"))); // NOI18N
        jButton36.setBorderPainted(false);
        jButton36.setContentAreaFilled(false);
        jButton36.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jButton36.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton36ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton36);
        jButton36.setBounds(1310, 0, 40, 40);

        jButton44.setFont(new java.awt.Font("Tahoma", 3, 12)); // NOI18N
        jButton44.setText("Acerca del programa");
        jButton44.setBorderPainted(false);
        jButton44.setContentAreaFilled(false);
        jButton44.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jButton44.setDefaultCapable(false);
        jButton44.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton44ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton44);
        jButton44.setBounds(1060, 70, 240, 23);
        getContentPane().add(jLabel93);
        jLabel93.setBounds(0, 0, 210, 90);

        recibe.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        recibe.setText("Admin");
        getContentPane().add(recibe);
        recibe.setBounds(990, 20, 320, 29);

        jLabel110.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        jLabel110.setText("LE ATIENDE:");
        getContentPane().add(jLabel110);
        jLabel110.setBounds(820, 20, 160, 29);

        fondo.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                fondoKeyPressed(evt);
            }
        });
        getContentPane().add(fondo);
        fondo.setBounds(0, 0, 1360, 110);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    public ImageIcon logo() {
        ImageIcon IconAux = new ImageIcon(getClass().getResource("/visor/XION.png"));
        ImageIcon temp = new ImageIcon(IconAux.getImage().getScaledInstance(jLabel93.getWidth(), jLabel93.getHeight(), Image.SCALE_DEFAULT));
        return temp;
    }

    public ImageIcon ajustarImagen3() {
        ImageIcon IconAux = new ImageIcon(getClass().getResource("/imagenes/admon2.png"));
        ImageIcon temp = new ImageIcon(IconAux.getImage().getScaledInstance(jLabel30.getWidth(), jLabel30.getHeight(), Image.SCALE_DEFAULT));
        return temp;
    }

    public void limpiar() {
        id_persona.setText("");
        jTextField4.setText("");
        jTextField6.setText("");
        jTextField33.setText("");
        jTextField4.setText("");
        jTextField10.setText("");
        jTextField8.setText("");
        nom.setText("");
        col.setText("");
        tel.setText("");
    }

    public ImageIcon fotoo(String prin) {
        con.conectar();
        InputStream is = null;
        ImageIcon ii = null;
        int i = 0;
        BufferedImage img = null;
        try {

            java.sql.Statement stmt = con.getConexion().createStatement();
            rs = stmt.executeQuery("select foto from personas where id_per='" + prin + "'");
            if (rs.next()) {
                is = rs.getBinaryStream(1);
                BufferedImage bi = null;

                if (is != null) {
                    bi = ImageIO.read(is);
                    ii = new ImageIcon(bi);
                } else {
                }
            }
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        } catch (IOException ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
        return ii;
    }

    public void Busqueda() {
        //  ESTO ES PARA EVITAR EL ERROR DE BUSQUEDAS

        try {
            int a = modelo.getRowCount() - 1;
            for (int i = a; i >= 0; i--) {
                modelo.removeRow(i);
            }
            con.conectar();
            java.sql.Statement stt = con.getConexion().createStatement();
            rss = stt.executeQuery("SELECT * FROM personas");
            if (rss.next()) {

                try {

                    con.conectar();
                    java.sql.Statement stmt = con.getConexion().createStatement();
                    rs = stmt.executeQuery("SELECT * FROM REGISTRO_PERSONAS order by tipo_persona");

                    rsm = rs.getMetaData();
                    while (rs.next()) {
                        Object[] fila = new Object[8];
                        for (int i = 0; i < 8; i++) {
                            fila[i] = rs.getObject(i + 1);
                        }
                        modelo.addRow(fila);
                    }

                } catch (Exception ex) {
                    JOptionPane.showMessageDialog(this, ex.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
                }
            } else {
                JOptionPane.showMessageDialog(null, "No existen ningun registro");
            }

        } catch (Exception ex) {
            JOptionPane.showMessageDialog(null, ex.getMessage());
        }
    }

    public void filtro() {
        if (jComboBox3.getSelectedItem() == "NOMBRE") {
            trsfiltro.setRowFilter(RowFilter.regexFilter(jTextField5.getText(), 2));
        } else {
            if (jComboBox3.getSelectedItem() == "TIPO PERSONA") {
                trsfiltro.setRowFilter(RowFilter.regexFilter(jTextField5.getText(), 1));
            }
        }
    }

    public void Ver_datos() {
        String prin;
        person.setEditable(false);
        nomm.setEditable(false);
        jTextField33.setEditable(false);
        sex.setEditable(false);
        jTextField11.setEditable(false);
        jTextField13.setEditable(false);
        jTextField14.setEditable(false);
        jTextField15.setEditable(false);
        nom1.setEditable(false);
        nom2.setEditable(false);
        col1.setEditable(false);
        try {
            con.conectar();
            java.sql.Statement stm = con.getConexion().createStatement();
            String s = null;
            String buscar = (String) this.RFC.getText();
            String busca = (String) this.RFC.getText();
            rs = stm.executeQuery("select * from personas where id_per like '%" + buscar + "%' ");

            if (rs.next()) {
                String dato = rs.getString(6);
                String hot = "@hotmail.com";
                String live = "@live.com";
                String gmail = "@gmail.com";
                String out = "@outlook.com";
                String yah = "@yahoo.com";
                String fac = "@facebook.com";
                String tw = "@twitter.com";

                boolean ho = dato.contains(hot);
                boolean li = dato.contains(live);
                boolean gm = dato.contains(gmail);
                boolean ou = dato.contains(out);
                boolean ya = dato.contains(yah);
                boolean fa = dato.contains(fac);
                boolean t = dato.contains(tw);
                if (ho) {
                    String hotm = dato.replace("@hotmail.com", "");
                    jTextField33.setText(hotm);
                } else {
                    if (li) {
                        String ll = dato.replace("@live.com", "");
                        jTextField33.setText(ll);
                    } else {
                        if (gm) {
                            String gmm = dato.replace("@gmail.com", "");
                            jTextField33.setText(gmm);
                        } else {
                            if (ou) {
                                String ouu = dato.replace("@outlook.com", "");
                                jTextField33.setText(ouu);
                            } else {
                                if (ya) {
                                    String yaa = dato.replace("@yahoo.com", "");
                                    jTextField33.setText(yaa);
                                } else {
                                    if (fa) {
                                        String facc = dato.replace("@facebook.com", "");
                                        jTextField33.setText(facc);
                                    } else {
                                        if (t) {
                                            String tvv = dato.replace("@twitter.com", "");
                                            jTextField33.setText(tvv);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                jTextField5.setText("");

                RFC.setText(rs.getString(1));
                person.setText(rs.getString(2));
                nomm.setText(rs.getString(3));
                sex.setText(rs.getString(4));
                jTextField13.setText(rs.getString(5));
                jTextField11.setText(rs.getString(6));

                //LAMA METODO FOTOO PARA VER IMAGEN EN JTABLE 
                ImageIcon img;
                prin = rs.getString(1);
                img = fotoo(prin);
                if (img == null) {
                    jLabel32.setIcon(ajustarImagen());

                } else {
                    Icon icono = new ImageIcon(img.getImage().getScaledInstance(jLabel32.getWidth(), jLabel32.getHeight(), Image.SCALE_DEFAULT));

                    jLabel32.setIcon(icono);
                    jLabel32.updateUI();
                }
                rss = stm.executeQuery("select * from direccion where id_per like '%" + buscar + "%' ");
                if (rss.next()) {
                    nom1.setText(rss.getString(2));
                    nom2.setText(rss.getString(3));
                    col1.setText(rss.getString(4));
                    jTextField14.setText(rss.getString(5));
                    jTextField15.setText(rss.getString(6));
                }
            }
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
    }
    private void EditarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_EditarActionPerformed
        person.setEditable(true);
        nomm.setEditable(true);
        jTextField33.setEditable(true);
        sex.setEditable(true);
        jTextField11.setEditable(true);
        jTextField13.setEditable(true);
        jTextField14.setEditable(true);
        jTextField15.setEditable(true);
        nom1.setEditable(true);
        nom2.setEditable(true);
        col1.setEditable(true);
    }//GEN-LAST:event_EditarActionPerformed
    public ImageIcon ajustarImagen() {
        ImageIcon IconAux = new ImageIcon(getClass().getResource("/visor/foto-no-disponible.jpg"));
        ImageIcon temp = new ImageIcon(IconAux.getImage().getScaledInstance(jLabel32.getWidth(), jLabel32.getHeight(), Image.SCALE_DEFAULT));
        return temp;
    }
    private void EliminarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_EliminarActionPerformed
        conn.conectar();
        int fila = jTable4.getSelectedRow();
        if (jTable4.getSelectedRow() >= 0) {
            String[] datosLeidos = {
                String.valueOf(jTable4.getValueAt(jTable4.getSelectedRow(), 0)),
                String.valueOf(jTable4.getValueAt(jTable4.getSelectedRow(), 1)),
                String.valueOf(jTable4.getValueAt(jTable4.getSelectedRow(), 2)),
                String.valueOf(jTable4.getValueAt(jTable4.getSelectedRow(), 3)),
                String.valueOf(jTable4.getValueAt(jTable4.getSelectedRow(), 4)),
                String.valueOf(jTable4.getValueAt(jTable4.getSelectedRow(), 5)),
                String.valueOf(jTable4.getValueAt(jTable4.getSelectedRow(), 6)),
                String.valueOf(jTable4.getValueAt(jTable4.getSelectedRow(), 7)),};

            try {
                java.sql.Statement stmt = conn.getConexion().createStatement();
                String buscar = datosLeidos[0];
                String buscar2 = datosLeidos[2];
                rss = stmt.executeQuery("select * from personas where id_per='" + buscar + "'");
                PreparedStatement pst = conn.getConexion().prepareStatement("DELETE FROM personas WHERE id_per='" + buscar + "'");
                pst.executeUpdate();
                JOptionPane.showMessageDialog(null, "El registro ha sido eliminado");
                DefaultTableModel model = (DefaultTableModel) jTable4.getModel();
                model.removeRow(jTable4.getSelectedRow());

            } catch (SQLException ex) {
                JOptionPane.showMessageDialog(null, ex.getMessage());
            }
        }
    }//GEN-LAST:event_EliminarActionPerformed

    private void fotoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fotoActionPerformed
        JFileChooser abrir = new JFileChooser();
        abrir.setFileSelectionMode(JFileChooser.FILES_ONLY);
        FileNameExtensionFilter filtroImagen = new FileNameExtensionFilter("JPG, PNG & GIF", "jpg", "png", "gif");
        abrir.setFileFilter(filtroImagen);
        int estado = abrir.showOpenDialog(null);
        if (estado == JFileChooser.APPROVE_OPTION) {
            try {
                dis = new FileInputStream(abrir.getSelectedFile());
                try {
                    //Ajustar al label
                    Image icono = ImageIO.read(abrir.getSelectedFile()).getScaledInstance(jLabel32.getWidth(), jLabel32.getHeight(), Image.SCALE_DEFAULT);
                    jLabel32.setIcon(new ImageIcon(icono));

                    jLabel32.updateUI();
                } catch (IOException ex) {
                    JOptionPane.showMessageDialog(this, "No se encontro ninguna foto ");
                }

            } catch (FileNotFoundException ex) {
                JOptionPane.showMessageDialog(this, "No se encontro ninguna foto ");
            }
        }
    }//GEN-LAST:event_fotoActionPerformed
    public void buscar_producto() {
        try {
            int a = modelo1.getRowCount() - 1;
            for (int i = a; i >= 0; i--) {
                modelo1.removeRow(i);
            }

            con.conectar();
            java.sql.Statement stmt = con.getConexion().createStatement();
            rss = stmt.executeQuery("select * from producto");
            if (rss.next()) {
                rs = stmt.executeQuery("select * from procc");

                rsm = rs.getMetaData();
                ArrayList<Object[]> data = new ArrayList<>();
                while (rs.next()) {
                    Object[] fila = new Object[7];
                    for (int i = 0; i < 7; i++) {
                        fila[i] = rs.getObject(i + 1);
                    }
                    modelo1.addRow(fila);
                }
                jTabbedPane1.requestFocusInWindow();
            } else {
                JOptionPane.showMessageDialog(null, "No se encontraron registros");
                jTabbedPane1.requestFocusInWindow();
            }
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(null, ex.getMessage());
        }
    }

    public void agregar_produc() {
        try {
            con.conectar();
            if (jTextField17.getText().trim().length() == 0 || jTextField18.getText().trim().length() == 0
                    || jTextField20.getText().trim().length() == 0) {
                JOptionPane.showMessageDialog(this, "Algun campo está vacío");
            } else {
                java.sql.Statement stmt = con.getConexion().createStatement();
                String buscar = (String) this.jTextField17.getText();
                rss = stmt.executeQuery("select * from producto where nom_producto like '%" + buscar + "%' ");
                if (rss.next()) {
                    JOptionPane.showMessageDialog(null, "Ya existe un producto con este nombre " + jTextField17.getText());
                } else {

                    PreparedStatement stmtt = null;
                    CallableStatement prc = con.getConexion().prepareCall("{call ing_producto (?,?,?,?,?,?,?,?) }");
                    prc.setString(1, jTextField17.getText());
                    if (jTextField19.getText().equals("")) {
                        prc.setString(3, "");
                    } else {
                        prc.setString(3, jTextField19.getText());
                    }

                    float preci = Float.parseFloat(jTextField20.getText());
                    prc.setString(2, jTextField18.getText());

                    prc.setFloat(4, preci);
                    prc.setString(5, jTextArea1.getText());
                    int max = Integer.parseInt(jTextField7.getText());
                    int min = Integer.parseInt(jTextField9.getText());
                    prc.setInt(6, min);
                    prc.setInt(7, max);
                    prc.setBlob(8, dis);
                    prc.executeUpdate();
                    //AGREGA DATOS AL JTABLE
                    buscar_producto();
                    jComboBox9.addItem(jTextField17.getText());
                    JOptionPane.showMessageDialog(null, "Producto registrado ");
                    jTextField7.setText("");
                    jTextField9.setText("");
                    jTextField17.setText("");
                    jTextField18.setText("");
                    jTextField19.setText("");
                    jTextField20.setText("");
                    jTextArea1.setText("");
                    jLabel2.setIcon(null);
                }
            }
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(null, ex.getMessage());
        }
    }

    public ImageIcon foto_producto(String prin) {
        con.conectar();
        InputStream is = null;
        ImageIcon ii = null;
        int i = 0;
        BufferedImage img = null;
        try {

            java.sql.Statement stmt = con.getConexion().createStatement();
            rs = stmt.executeQuery("select foto from procc where id_pro='" + prin + "'");
            if (rs.next()) {
                is = rs.getBinaryStream(1);
                BufferedImage bi = null;

                if (is != null) {
                    bi = ImageIO.read(is);
                    ii = new ImageIcon(bi);
                } else {
                }
            }
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        } catch (IOException ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
        return ii;
    }

    public ImageIcon ajustarImagen2() {
        ImageIcon IconAux = new ImageIcon(getClass().getResource("/visor/foto-no-disponible.jpg"));
        ImageIcon temp = new ImageIcon(IconAux.getImage().getScaledInstance(jLabel51.getWidth(), jLabel51.getHeight(), Image.SCALE_DEFAULT));
        return temp;
    }
    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        JFileChooser abrir = new JFileChooser();
        abrir.setFileSelectionMode(JFileChooser.FILES_ONLY);
        int estado = abrir.showOpenDialog(null);
        if (estado == JFileChooser.APPROVE_OPTION) {
            try {
                dis = new FileInputStream(abrir.getSelectedFile());
                try {
                    //Ajustar al label
                    Image icono = ImageIO.read(abrir.getSelectedFile()).getScaledInstance(jLabel51.getWidth(), jLabel51.getHeight(), Image.SCALE_DEFAULT);
                    jLabel51.setIcon(new ImageIcon(icono));

                    jLabel51.updateUI();
                } catch (IOException ex) {
                    JOptionPane.showMessageDialog(this, ex.getMessage());
                }

            } catch (FileNotFoundException ex) {
                JOptionPane.showMessageDialog(this, ex.getMessage());
            }
        }
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void Editar1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Editar1ActionPerformed
        jTextField7.setEnabled(true);
        jTextField9.setEnabled(true);
        jTextField17.setEnabled(true);
        jTextField18.setEnabled(true);
        jTextField19.setEnabled(true);
        jTextField20.setEnabled(true);
        jTextArea1.setEnabled(true);
    }//GEN-LAST:event_Editar1ActionPerformed

    private void Eliminar1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Eliminar1ActionPerformed
        conn.conectar();
        int fila = jTable6.getSelectedRow();
        if (jTable6.getSelectedRow() >= 0) {
            String[] datosLeidos = {
                String.valueOf(jTable6.getValueAt(jTable6.getSelectedRow(), 0)),
                String.valueOf(jTable6.getValueAt(jTable6.getSelectedRow(), 1)),};

            try {
                java.sql.Statement stmt = conn.getConexion().createStatement();
                String buscar = datosLeidos[0];
                String producto = datosLeidos[1];
                rs = stmt.executeQuery("select * from almacen where producto='" + producto + "'");
                if (rs.next()) {
                    int axx = JOptionPane.showConfirmDialog(null, "Este producto esta siendo utilizado si lo elimina será eliminado en almacen!!..¡Esta seguro de eliminarlo?");
                    if (axx == JOptionPane.YES_OPTION) {
                        rr = stmt.executeQuery("delete from almacen where producto='" + producto + "'");
                        //ELIMINAR PRODUCTO
                        rss = stmt.executeQuery("select * from producto where id_pro='" + buscar + "'");
                        if (rss.next()) {
                            PreparedStatement pst = conn.getConexion().prepareStatement("DELETE FROM producto WHERE id_pro='" + buscar + "'");
                            pst.executeUpdate();
                            JOptionPane.showMessageDialog(null, "El registro ha sido eliminado");
                            DefaultTableModel model = (DefaultTableModel) jTable6.getModel();
                            model.removeRow(jTable6.getSelectedRow());
                        }
                    } else if (axx == JOptionPane.NO_OPTION) {
                    }
                } else {
                    rss = stmt.executeQuery("select * from producto where id_pro='" + buscar + "'");
                    if (rss.next()) {
                        PreparedStatement pst = conn.getConexion().prepareStatement("DELETE FROM producto WHERE id_pro='" + buscar + "'");
                        pst.executeUpdate();
                        JOptionPane.showMessageDialog(null, "El registro ha sido eliminado");
                        DefaultTableModel model = (DefaultTableModel) jTable6.getModel();
                        model.removeRow(jTable6.getSelectedRow());
                    }
                }
            } catch (SQLException ex) {
                JOptionPane.showMessageDialog(null, ex.getMessage());
            }
        }
    }//GEN-LAST:event_Eliminar1ActionPerformed

    private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton16ActionPerformed
        if (this.jTable1.getRowCount() != 0 && this.jTable1.getSelectedRow() != 0) {
            int fila = jTable1.getRowCount();
            int row = jTable1.getRowCount();
            int total = 0;
            for (int i = 0; i < row; i++) {
                total += Integer.parseInt(jTable1.getValueAt(i, 0).toString());
            }

            String totalResult = Integer.toString(total);
            jLabel49.setText(totalResult);

            int axx = JOptionPane.showConfirmDialog(null, "Tiene registros en ventas,En realidad desea salir");

            if (axx == JOptionPane.YES_OPTION) {
                LOGIN2 log = new LOGIN2();
                log.setVisible(true);
                dispose();
            } else if (axx == JOptionPane.NO_OPTION) {
            }
        } else {
            LOGIN2 log = new LOGIN2();
            log.setVisible(true);
            dispose();
        }
    }//GEN-LAST:event_jButton16ActionPerformed

    public void suma_ventas() {
        // EN ESTA PARTE REALIZA LA SUMA DE LA COLUMNA Q DESEAMOS
        int fila = jTable1.getRowCount();
        int row = jTable1.getRowCount();
        int total = 0;
        for (int i = 0; i < row; i++) {
            //---------EN ESTA PARTE QUITAMOS EL SINO DE PESOS PARA PODER SUMAR LA COLUMNA IMPORTE-------------------
            String dato = jTable1.getValueAt(i, 5).toString();
            String hot = "$";
            boolean ho = dato.contains(hot);
            if (ho) {
                String hotm = dato.replace("$", "");

                total += Integer.parseInt(hotm);
            }
            //--------------------------------
        }
        String totalResult = Integer.toString(total);
        jLabel49.setText(totalResult);
        //CUENTA LOS PRODUCTOS QUE HAY EN LA TABLA VENTAS
        int numm = modelo2.getRowCount();
        String cant = String.valueOf(numm);
        jLabel88.setText(cant);
    }

    public void agregar_producto() {
        try {
            con.conectar();
            java.sql.Statement stmt = con.getConexion().createStatement();

            rs = stmt.executeQuery("select det.id_pro as idd,nom_producto,precio_venta,categoria from"
                    + " producto pro,detalle_producto det where pro.id_pro = det.id_pro and nom_producto='" + jTextField1.getText() + "'");
            if (jTextField1.getText().trim().length() == 0 || jTextField32.getText().trim().length() == 0) {
                JOptionPane.showMessageDialog(this, "Verifique que ningun campo este vacío");
            } else {
                if (rs.next()) {
                    try {
                        String id = rs.getString("idd");
                        String producto = rs.getString("nom_producto");
                        String categoria = rs.getString("categoria");
                        String venta = rs.getString("precio_venta");

                        rss = stmt.executeQuery("select cantidad_alm from almacen where producto='" + jTextField1.getText() + "'");
                        if (rss.next()) {
                            //PARA OBTENER EL DATO EN LA COLUMNA EXISTENCIA
                            int cant = Integer.parseInt(rss.getString("cantidad_alm"));
                            int cant_pro = Integer.parseInt(jTextField32.getText());
                            int cantidad = cant - cant_pro;
                            if (cant_pro == 0) {
                                JOptionPane.showMessageDialog(null, "Ingrese una cantidad distinta a 0");
                            } else {
                                if (cant_pro > cant) {
                                    JOptionPane.showMessageDialog(null, "No puede vender la cantidad de " + jTextField32.getText()
                                            + " ya que cuenta solamente con " + cant);

                                } else {

                                    String[] NuevosDatos = new String[3];
                                    NuevosDatos[1] = producto;
                                    String dat = jTextField32.getText();
                                    int num = Integer.parseInt(dat);

                                    int pro = Integer.parseInt(venta);
                                    int importe = pro * num;

                                    if (this.jTable1.getRowCount() != 0 && this.jTable1.getSelectedRow() != 0) {
                                        //AQUI VERIFICA LOS DATOS Q ESTAN REPETIDOS Y NO LOS AGREGA
                                        for (int i = 0; i < jTable1.getRowCount(); i++) {
                                            if (jTable1.getValueAt(i, 1).equals(jTextField1.getText())) {
                                                jTable1.changeSelection(i, 0, false, false);
                                                modelo2.removeRow(i);
                                            }
                                        }
                                        //AQUI AGREGA LOS DATOS AL JTABLE 
                                        modelo2.addRow(new Object[]{id, producto, categoria, "$" + venta, num, "$" + importe, cantidad});
                                        jTextField1.setText("");
                                        jTextField32.setText("");
                                        //  LA SUMA DE LA COLUMNA Q DESEAMOS DE LA TABLA VENTAS
                                        suma_ventas();
                                    } else {

                                        //    JOptionPane.showMessageDialog(null, "El jTable esta vacio");
                                        modelo2.addRow(new Object[]{id, producto, categoria, "$" + venta, num, "$" + importe, cantidad});
                                        jTextField1.setText("");
                                        jTextField32.setText("");
                                        // EN ESTA PARTE REALIZAMOS LA SUMA DE LA COLUMNA  DE LA TABLA Q DESEAMOS
                                        suma_ventas();
                                    }
                                }
                            }
                        } else {
                            JOptionPane.showMessageDialog(this, "No hay el producto " + jTextField1.getText() + " en el Almacen");
                        }
                    } catch (Exception e) {
                        JOptionPane.showMessageDialog(this, e.getMessage());
                    }

                } else {
                    JOptionPane.showMessageDialog(null, "Este producto no esta registrado");
                    jTextField1.setText("");
                    jTextField32.setText("");
                }
            }
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
    }

    private void jButton35ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton35ActionPerformed

        try {
            jTable1.print(); // Imprime el jTable
        } catch (Exception ex) {
        }

    }//GEN-LAST:event_jButton35ActionPerformed
    public void borrar_fila() {
        int fila = jTable1.getSelectedRow();
        if (fila >= 0) {
            modelo4.removeRow(fila);
        }
        // EN ESTA PARTE REALIZA LA SUMA DE LA COLUMNA Q DESEAMOS
        suma_ventas();

    }

    public ImageIcon imagenAlmacen() {
        ImageIcon IconAux = new ImageIcon(getClass().getResource("/visor/images.jpg"));
        ImageIcon temp = new ImageIcon(IconAux.getImage().getScaledInstance(jLabel84.getWidth(), jLabel84.getHeight(), Image.SCALE_DEFAULT));
        return temp;
    }

    public ImageIcon fotoAlmacen(String prin) {
        con.conectar();
        InputStream is = null;
        ImageIcon ii = null;
        int i = 0;
        BufferedImage img = null;
        try {

            java.sql.Statement stmt = con.getConexion().createStatement();
            rs = stmt.executeQuery("select foto from producto pro,detalle_producto det where pro.id_pro=det.id_pro and nom_producto='" + prin + "'");
            if (rs.next()) {
                is = rs.getBinaryStream(1);
                BufferedImage bi = null;

                if (is != null) {
                    bi = ImageIO.read(is);
                    ii = new ImageIcon(bi);
                } else {
                }
            }
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        } catch (IOException ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
        return ii;
    }
    private void jButton36ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton36ActionPerformed
        setExtendedState(JFrame.CROSSHAIR_CURSOR);
    }//GEN-LAST:event_jButton36ActionPerformed

    private void jDateChooser1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jDateChooser1MouseClicked
    }//GEN-LAST:event_jDateChooser1MouseClicked

    private void Editar_empleoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Editar_empleoActionPerformed
        int fila = jTable5.getSelectedRow();
        if (jTable5.getSelectedRow() >= 0) {
            String[] datosLeidos = {
                String.valueOf(jTable5.getValueAt(jTable5.getSelectedRow(), 0)),
                String.valueOf(jTable5.getValueAt(jTable5.getSelectedRow(), 1)),};
            jTextField26.setText(datosLeidos[0]);
            jTextField24.setText(datosLeidos[1]);
        }
    }//GEN-LAST:event_Editar_empleoActionPerformed

    private void Eliminar_empleoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Eliminar_empleoActionPerformed
        int fila = jTable5.getSelectedRow();
        if (jTable5.getSelectedRow() >= 0) {
            String[] datosLeidos = {
                String.valueOf(jTable6.getValueAt(jTable6.getSelectedRow(), 0)),};

            try {
                java.sql.Statement stmt = con.getConexion().createStatement();
                String buscar = datosLeidos[0];
                rss = stmt.executeQuery("select * from producto where id_pro='" + buscar + "'");
                if (rss.next()) {
                    PreparedStatement pst = con.getConexion().prepareStatement("DELETE FROM producto WHERE id_pro='" + buscar + "'");
                    pst.executeUpdate();
                    JOptionPane.showMessageDialog(null, "El registro ha sido eliminado");
                    DefaultTableModel model = (DefaultTableModel) jTable6.getModel();
                    model.removeRow(jTable6.getSelectedRow());
                }

            } catch (SQLException ex) {
                JOptionPane.showMessageDialog(null, ex.getMessage());
            }
        }
    }//GEN-LAST:event_Eliminar_empleoActionPerformed
    public void compras() {
        try {

            CallableStatement prc = con.getConexion().prepareCall("{call ing_com (?,?,?,?) }");
            prc.setString(1, jComboBox9.getSelectedItem().toString());
            int cant = Integer.parseInt(jSpinner1.getValue().toString());
            prc.setInt(2, cant);
            prc.setString(3, jLabel100.getText());
            prc.setString(4, fecha());
            prc.executeUpdate();
            JOptionPane.showMessageDialog(this, "Registro guardado");

        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }

    }

    public void consulta_ventas() {
        try {
            int a = modelo6.getRowCount() - 1;
            for (int i = a; i >= 0; i--) {
                modelo6.removeRow(i);
            }

            con.conectar();
            java.sql.Statement stmt = con.getConexion().createStatement();
            rss = stmt.executeQuery("select * from ventas");
            if (rss.next()) {
                rs = stmt.executeQuery("select * from ventas_realizadas");
                rsm = rs.getMetaData();
                ArrayList<Object[]> data = new ArrayList<>();
                while (rs.next()) {
                    Object[] fila = new Object[7];
                    for (int i = 0; i < 7; i++) {
                        fila[i] = rs.getObject(i + 1);
                    }
                    modelo6.addRow(fila);
                }
            } else {
                JOptionPane.showMessageDialog(null, "No se encontró ningún registro");
            }

        } catch (Exception ex) {
            JOptionPane.showMessageDialog(null, ex.getMessage());
        }
    }

    public void filtro3() {
        trsfiltro.setRowFilter(RowFilter.regexFilter(jTextField16.getText(), 1));
    }

    public void busca_producto() {
        try {
            int a = modelo7.getRowCount() - 1;
            for (int i = a; i >= 0; i--) {
                modelo7.removeRow(i);
            }

            con.conectar();
            java.sql.Statement stmt = con.getConexion().createStatement();
            rs = stmt.executeQuery("SELECT * FROM almacenn");

            rsm = rs.getMetaData();
            ArrayList<Object[]> data = new ArrayList<>();
            while (rs.next()) {
                Object[] fila = new Object[5];
                for (int i = 0; i < 5; i++) {
                    fila[i] = rs.getObject(i + 1);
                }
                modelo7.addRow(fila);
            }
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(null, ex.getMessage());
        }
    }
    private void jButton38ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton38ActionPerformed
        busca_producto();
    }//GEN-LAST:event_jButton38ActionPerformed

    private void jTextField16KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField16KeyTyped
        jTextField16.addKeyListener(new KeyAdapter() {
            public void keyReleased(final KeyEvent e) {
                String cadena = (jTextField16.getText()).toUpperCase();
                jTextField16.setText(cadena);
                repaint();
                filtro3();
            }
        });
        trsfiltro = new TableRowSorter(jTable9.getModel());
        jTable9.setRowSorter(trsfiltro);
    }//GEN-LAST:event_jTextField16KeyTyped

    private void jButton39ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton39ActionPerformed
        int fila = jTable9.getSelectedRow();
        try {
            if (fila == -1) {
                JOptionPane.showMessageDialog(this, "Debe seleccionar una fila");
            } else {
                String a = String.valueOf(jTable9.getValueAt(fila, 0));
                String b = String.valueOf(jTable9.getValueAt(fila, 1));
                String c = String.valueOf(jTable9.getValueAt(fila, 2));
                String dato = String.valueOf(jTable9.getValueAt(fila, 3));


                //      String dato = jTable1.getValueAt(i, 5).toString();
                String hot = "$";
                boolean ho = dato.contains(hot);
                if (ho) {
                    String hotm = dato.replace("$", "");

                    //   total += Integer.parseInt(hotm);
                    //--------------------------------

                    int dd = Integer.parseInt(hotm);
                    String cant = jSpinner3.getValue().toString();
                    int cat = Integer.parseInt(jSpinner3.getValue().toString());
                    int result = dd * cat;
                    String resultado = String.valueOf(result);
                    //       String fila_elementos[]={a,b,c,d,cant,resultado};
                    //  modelo2.addRow(fila_elementos);

                    java.sql.Statement stmt = con.getConexion().createStatement();
                    rss = stmt.executeQuery("select cantidad_alm from almacen where producto='" + b + "'");
                    if (rss.next()) {
                        //PARA OBTENER EL DATO EN LA COLUMNA EXISTENCIA
                        int cantt = Integer.parseInt(rss.getString("cantidad_alm"));
                        int cant_pro = Integer.parseInt(cant);
                        int cantidad = cantt - cant_pro;
                        if (cant_pro > cantt) {
                            JOptionPane.showMessageDialog(null, "No puede vender la cantidad de " + cant
                                    + " ya que cuenta solamente con " + cantt);

                        } else {
                            String[] NuevosDatos = new String[3];
                            NuevosDatos[1] = b;
                            String dat = cant;//revisar ahorita
                            int num = Integer.parseInt(dat);

                            int pro = Integer.parseInt(hotm);
                            int importe = pro * num;

                            if (this.jTable1.getRowCount() != 0 && this.jTable1.getSelectedRow() != 0) {
                                //AQUI VERIFICA LOS DATOS Q ESTAN REPETIDOS Y NO LOS AGREGA
                                for (int i = 0; i < jTable1.getRowCount(); i++) {
                                    if (jTable1.getValueAt(i, 1).equals(b)) {
                                        jTable1.changeSelection(i, 0, false, false);
                                        modelo2.removeRow(i);
                                    }
                                }
                                //AQUI AGREGA LOS DATOS AL JTABLE 
                                modelo2.addRow(new Object[]{a, b, c, "$" + hotm, cant, "$" + resultado, cantidad});
                                suma_ventas();
                            } else {
                                //    JOptionPane.showMessageDialog(null, "El jTable esta vacio");
                                modelo2.addRow(new Object[]{a, b, c, "$" + hotm, cant, "$" + resultado, cantidad});
                                suma_ventas();
                            }
                        }
                    } else {
                        JOptionPane.showMessageDialog(this, "No hay el producto " + b + " en el Almacen");
                    }
                }
            }
        } catch (Exception e) {
        }
    }//GEN-LAST:event_jButton39ActionPerformed

private void jTabbedPane1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTabbedPane1MouseClicked
    pro_bajos();
    //  if (jTabbedPane1.getSelectedIndex() == 1) {

    //    JOptionPane.showMessageDialog(null, "Se ha seleccionado el uno ");

    //  } else {
    //     if (jTabbedPane1.getSelectedIndex() == 2) {

    //  }
    //}
}//GEN-LAST:event_jTabbedPane1MouseClicked

private void checkMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_checkMouseClicked
    if (check.isSelected()) {
        jLabel101.setVisible(true);
        jComboBox5.setVisible(true);
    } else {
        jLabel101.setVisible(false);
        jComboBox5.setVisible(false);
    }
}//GEN-LAST:event_checkMouseClicked

private void jComboBox9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox9ActionPerformed
    if (jComboBox9.getItemCount() <= 0) {
    } else {
        try {
            con.conectar();
            java.sql.Statement stmt = con.getConexion().createStatement();
            rs = stmt.executeQuery("select nom_producto,cantidad_alm,precio_venta from producto pro,almacen al where pro.nom_producto=al.producto and nom_producto='" + jComboBox9.getSelectedItem().toString() + "'");
            if (rs.next()) {
                jLabel107.setText(rs.getString("cantidad_alm"));
                jLabel100.setText(rs.getString("precio_venta"));
            } else {
                jLabel107.setText("0");
                jLabel100.setText(" ");
            }

        } catch (SQLException ex) {
        }
    }
}//GEN-LAST:event_jComboBox9ActionPerformed
    public void add_inventario() {
        try {
            java.sql.Statement stmt = con.getConexion().createStatement();
            rs = stmt.executeQuery("select * from almacen where producto='" + jComboBox9.getSelectedItem().toString() + "'");
            if (rs.next()) {
                CallableStatement prc2 = con.getConexion().prepareCall("{call mod_almacen2 (?,?,?) }");
                prc2.setString(1, jComboBox9.getSelectedItem().toString());
                int cant = Integer.parseInt(jSpinner1.getValue().toString());
                prc2.setInt(2, cant);
                prc2.setString(3, fecha());
                prc2.executeUpdate();
                JOptionPane.showMessageDialog(this, "Registro guardado");

                pro_bajos();
            } else {
                if (check.isSelected()) {
                    compras();
                } else {
                    compras();
                }
            }

        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(null, ex.getMessage());
        }
    }
private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
    add_inventario();
}//GEN-LAST:event_jButton9ActionPerformed

private void jLabel83MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel83MouseClicked
}//GEN-LAST:event_jLabel83MouseClicked

private void jButton32ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton32ActionPerformed
    con.conectar();
    try {
        if (ImageIcon.class.equals(jLabel31)) {
        } else {
            if (jTextField31.getText().trim().length() == 0 && jTextField30.getText().trim().length() == 0
                    && person1.getText().trim().length() == 0 && person2.getText().trim().length() == 0
                    && col2.getText().trim().length() == 0 && jTextField28.getText().trim().length() == 0
                    && nomm1.getText().trim().length() == 0 && nom3.getText().trim().length() == 0
                    && jTextField29.getText().trim().length() == 0 && nom5.getText().trim().length() == 0
                    && jTextField27.getText().trim().length() == 0
                    && jTextField28.getText().trim().length() == 0) {
                JOptionPane.showMessageDialog(this, "Algun campo está vacío");
            } else {
                //COMPROBAR SI EXISTEN REGISTROS
                java.sql.Statement stmt = con.getConexion().createStatement();
                String buscar = (String) this.person2.getText();
                rss = stmt.executeQuery("select * from personas where id_per like '%" + buscar + "%' ");

                java.sql.Statement sS = con.getConexion().createStatement();
                String tell = (String) this.jTextField29.getText();
                tels = sS.executeQuery("select * from personas where numero_telefono like '%" + tell + "%' ");
                if (tels.next()) {
                    JOptionPane.showMessageDialog(null, "Ya existe numero telefónico " + tell);
                } else {
                    java.sql.Statement sm = con.getConexion().createStatement();
                    String msn = (String) this.jTextField27.getText();
                    cor = sm.executeQuery("select * from personas where correo like '%" + msn + "%' ");

                    if (cor.next()) {
                        JOptionPane.showMessageDialog(null, "Este correo ya existe ,favor de poner una distinta");
                    } else {
                        if (rss.next()) {
                            JOptionPane.showMessageDialog(null, "El codigo " + buscar + " ya existe");
                        } else {
                            CallableStatement prcProcedimientoAlmacenado = con.getConexion().prepareCall("{ call insertar_persona(?,?,?,?,?,?,?,?) }");
                            prcProcedimientoAlmacenado.setString(1, person2.getText());
                            prcProcedimientoAlmacenado.setString(2, person1.getText());
                            prcProcedimientoAlmacenado.setString(3, nomm1.getText());
                            prcProcedimientoAlmacenado.setString(4, jComboBox2.getSelectedItem().toString());
                            prcProcedimientoAlmacenado.setString(5, jTextField27.getText());
                            prcProcedimientoAlmacenado.setString(6, jTextField29.getText());
                            prcProcedimientoAlmacenado.setString(7, fecha());
                            prcProcedimientoAlmacenado.setBlob(8, dis);
                            prcProcedimientoAlmacenado.executeUpdate();
                            //REGISTRO DOMICILIO
                            CallableStatement stmtt = con.getConexion().prepareCall("{ call insertar_direccion (?,?,?,?,?,?) }");
                            stmtt.setString(1, person2.getText());
                            stmtt.setString(2, nom3.getText());
                            stmtt.setString(3, nom5.getText());
                            stmtt.setString(4, col2.getText());
                            stmtt.setString(5, jTextField22.getText());
                            stmtt.setString(6, jTextField23.getText());
                            stmtt.executeUpdate();

                            CallableStatement stm = con.getConexion().prepareCall("{ call tipo_person (?,?,?) }");
                            stm.setString(1, person2.getText());
                            stm.setString(2, person2.getText());
                            stm.setString(3, "EMPLEADO");
                            stm.executeUpdate();

                            CallableStatement stt = con.getConexion().prepareCall("{ call ins_trab (?,?,?,?,?) }");
                            stt.setString(1, person2.getText());
                            stt.setString(2, jComboBox6.getSelectedItem().toString());
                            stt.setString(3, jTextField28.getText());
                            stt.setString(4, jTextField30.getText() + jComboBox7.getSelectedItem().toString());
                            stt.setString(5, jTextField31.getText() + jComboBox8.getSelectedItem().toString());
                            stt.executeUpdate();


                            int axx = JOptionPane.showConfirmDialog(null, "Desea crearle una cuena");
                            if (axx == JOptionPane.YES_OPTION) {
                                jComboBox1.addItem(person2.getText());
                                jTabbedPane1.setSelectedIndex(1);
                                jTabbedPane3.setSelectedIndex(2);
                                limpiar2();
                            } else if (axx == JOptionPane.NO_OPTION) {
                                limpiar2();
                                JOptionPane.showMessageDialog(null, "Se ha registrado satisfactoriamente");
                            }





                        }
                    }
                }
            }

        }

    } catch (Exception ex) {
        JOptionPane.showMessageDialog(this, ex.getMessage());
    }
}//GEN-LAST:event_jButton32ActionPerformed
    public void limpiar2() {
        nomm1.setText("");
        jTextField29.setText("");
        jTextField27.setText("");
        person1.setText("");
        nom3.setText("");
        nom5.setText("");
        person2.setText("");
        person1.setText("");
        jTextField28.setText("");
        jTextField30.setText("");
        jTextField31.setText("");
        col2.setText("");
    }

private void jComboBox8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox8ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_jComboBox8ActionPerformed

private void jComboBox6KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jComboBox6KeyTyped
}//GEN-LAST:event_jComboBox6KeyTyped

private void jComboBox6KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jComboBox6KeyReleased
}//GEN-LAST:event_jComboBox6KeyReleased

private void jComboBox6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox6ActionPerformed
    try {
        con.conectar();
        java.sql.Statement stmt = con.getConexion().createStatement();
        rs = stmt.executeQuery("select * from empleos where cargo='" + jComboBox6.getSelectedItem().toString() + "'");
        if (rs.next()) {
            jTextField28.setText(rs.getString("sueldo"));
        }

    } catch (Exception ex) {
        JOptionPane.showMessageDialog(this, ex.getMessage());
    }
}//GEN-LAST:event_jComboBox6ActionPerformed

private void jComboBox6MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jComboBox6MousePressed
}//GEN-LAST:event_jComboBox6MousePressed

private void nom5KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nom5KeyTyped
 nom5.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (nom5.getText()).toUpperCase();
            nom5.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_nom5KeyTyped

private void nom5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nom5ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_nom5ActionPerformed

private void jTextField23KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField23KeyTyped
    char c = evt.getKeyChar();
    if (jTextField8.getText().length() >= 3) {
        evt.consume();
    }
    if (c < '0' || c > '9') {
        evt.consume();
    }
}//GEN-LAST:event_jTextField23KeyTyped

private void jTextField23ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField23ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_jTextField23ActionPerformed

private void jTextField22KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField22KeyTyped
jTextField22.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (jTextField22.getText()).toUpperCase();
            jTextField22.setText(cadena);
            repaint();
        }
    });
    char c = evt.getKeyChar();
    if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && (c != (char) KeyEvent.VK_SPACE)) {
        evt.consume();
    }
}//GEN-LAST:event_jTextField22KeyTyped

private void jTextField22ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField22ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_jTextField22ActionPerformed

private void nom3KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nom3KeyTyped
 nom3.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (nom3.getText()).toUpperCase();
            nom3.setText(cadena);
            repaint();
        }
    });
    char c = evt.getKeyChar();
    if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && (c != (char) KeyEvent.VK_SPACE)) {
        evt.consume();
    }
}//GEN-LAST:event_nom3KeyTyped

private void nom3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nom3ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_nom3ActionPerformed

private void col2KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_col2KeyTyped
col2.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (col2.getText()).toUpperCase();
            col2.setText(cadena);
            repaint();
        }
    });
    char c = evt.getKeyChar();
    if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && (c != (char) KeyEvent.VK_SPACE)) {
        evt.consume();
    }
}//GEN-LAST:event_col2KeyTyped

private void col2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_col2ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_col2ActionPerformed

private void jTable8MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable8MouseClicked
    int fila = jTable1.getSelectedRow();
    if (jTable1.getSelectedRow() >= 0) {
        String[] datosLeidos = {
            String.valueOf(jTable1.getValueAt(jTable1.getSelectedRow(), 0)),};
        person1.setText(datosLeidos[0]);

    }
}//GEN-LAST:event_jTable8MouseClicked

private void jButton28ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton28ActionPerformed
    con.conectar();
    if (jTextField24.getText().trim().length() == 0
            || jTextField26.getText().trim().length() == 0) {
        JOptionPane.showMessageDialog(this, "Verifique, algun campo esta vacío");
    } else {
        try {
            java.sql.Statement stmt = con.getConexion().createStatement();
            String buscar = (String) this.jTextField26.getText();
            rss = stmt.executeQuery("select * from empleos where cargo like '%" + buscar + "%' ");
            if (rss.next()) {
                JOptionPane.showMessageDialog(null, jTextField26.getText() + " Ya esta registrado ");
            } else {
                CallableStatement stmtt = con.getConexion().prepareCall("{ call emple (?,?) }");

                stmtt.setString(1, jTextField26.getText());
                stmtt.setString(2, jTextField24.getText());
                stmtt.executeUpdate();
                jComboBox6.addItem(jTextField26.getText());
                JOptionPane.showMessageDialog(null, "Se ha insertado el registro");

                Object[] datosDeLaFila = {
                    "",
                    jTextField26.getText(),
                    jTextField24.getText()
                };
                DefaultTableModel modeloDeLaTabla = (DefaultTableModel) jTable5.getModel();
                modeloDeLaTabla.addRow(datosDeLaFila);
                jTable5.setModel(modeloDeLaTabla);

            }
            jTextField24.setText("");
            jTextField26.setText("");
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(null, ex.getMessage());
        }
    }
}//GEN-LAST:event_jButton28ActionPerformed

private void jButton27ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton27ActionPerformed
    con.conectar();
    if (jTextField26.getText().trim().length() == 0
            || jTextField24.getText().trim().length() == 0) {
        JOptionPane.showMessageDialog(this, "Verifique, algun campo esta vacío");
    } else {
        try {
            java.sql.Statement s = con.getConexion().createStatement();

            int fila = jTable5.getSelectedRow();
            if (jTable5.getSelectedRow() >= 0) {
                try {
                    String[] datosLeidos = {
                        String.valueOf(jTable5.getValueAt(jTable5.getSelectedRow(), 0)),
                        String.valueOf(jTable5.getValueAt(jTable5.getSelectedRow(), 1)),};
                    String prin = jTable5.getValueAt(fila, 0).toString();
                    rss = s.executeQuery("select * from empleos where cargo like '%" + prin + "%' ");
                    if (rss.next()) {
                        int num = Integer.parseInt(rss.getString(1));
                        CallableStatement stmt = con.getConexion().prepareCall("{ call mod_emple (?,?,?) }");
                        stmt.setInt(1, num);
                        stmt.setString(2, jTextField26.getText());
                        stmt.setString(3, jTextField24.getText());
                        stmt.executeUpdate();
                        JOptionPane.showMessageDialog(this, "Registro actualizado");
                        jTextField26.setText("");
                        jTextField24.setText("");
                    } else {
                        JOptionPane.showMessageDialog(null, "No se encontraron registros");

                    }
                } catch (SQLException ex) {
                    JOptionPane.showMessageDialog(this, ex.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
                }
            }
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(null, "Error: " + ex.getMessage());
        }
    }
}//GEN-LAST:event_jButton27ActionPerformed

private void jButton26ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton26ActionPerformed
    try {
        java.sql.Statement stmt = con.getConexion().createStatement();
        int axx = JOptionPane.showConfirmDialog(null, "Desea eliminar los registros");
        if (axx == JOptionPane.YES_OPTION) {
            rss = stmt.executeQuery("delete from empleos ");
            jTextField26.setText("");
            jTextField24.setText("");

            //REMOVER ELEMENTO DE JTABLE
            int filas = jTable5.getRowCount();
            for (int i = 0; filas > i; i++) {
                modelo5.removeRow(0);
            }
            JOptionPane.showMessageDialog(null, "Los registros han sido eliminados satisfactoriamente");
        } else if (axx == JOptionPane.NO_OPTION) {
        }
    } catch (SQLException ex) {
        JOptionPane.showMessageDialog(this, "Error " + ex.getMessage());
    }
}//GEN-LAST:event_jButton26ActionPerformed

private void jButton23ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton23ActionPerformed
    jTextField26.setText("");
    jTextField24.setText("");
    int a = modelo5.getRowCount() - 1;
    for (int i = a; i >= 0; i--) {
        modelo5.removeRow(i);
    }
    try {
        con.conectar();
        java.sql.Statement stmt = con.getConexion().createStatement();

        java.sql.Statement st = con.getConexion().createStatement();
        rs = st.executeQuery("select * from empleos ");

        rss = stmt.executeQuery("select id_emp,cargo,sueldo from empleos order by sueldo");
        if (!rs.next()) {
            JOptionPane.showMessageDialog(null, "No se encontraron registros");
        } else {
            rsm = rss.getMetaData();
            ArrayList<Object[]> data = new ArrayList<>();

            while (rss.next()) {
                Object[] fila = new Object[4];
                for (int i = 0; i < 3; i++) {
                    fila[i] = rss.getObject(i + 1);
                }
                modelo5.addRow(fila);
            }
        }
    } catch (Exception ex) {
        JOptionPane.showMessageDialog(this, "Error: " + ex.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
    }
}//GEN-LAST:event_jButton23ActionPerformed

private void jTextField26KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField26KeyTyped
    if (jTextField26.getText().length() == 15) {
        evt.consume();
    }
    jTextField26.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (jTextField26.getText()).toUpperCase();
            jTextField26.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_jTextField26KeyTyped

private void jTextField24KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField24KeyTyped
    char car = evt.getKeyChar();
    if (jTextField24.getText().length() >= 8) {
        evt.consume();
    }
    if ((car < '0' || car > '9')) {
        evt.consume();
    }

}//GEN-LAST:event_jTextField24KeyTyped

private void jTable5MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable5MouseClicked
}//GEN-LAST:event_jTable5MouseClicked

private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton14ActionPerformed
    jTextField17.setEnabled(true);
    jTextField18.setEnabled(true);
    jTextField19.setEnabled(true);
    jTextField20.setEnabled(true);
    jTextArea1.setEnabled(true);
    jTextField7.setEnabled(true);
    jTextField9.setEnabled(true);
    jTextField7.setText("");
    jTextField9.setText("");
    jTextField17.setText("");
    jTextField18.setText("");
    jTextField19.setText("");
    jTextField20.setText("");
    jTextArea1.setText("");
}//GEN-LAST:event_jButton14ActionPerformed

private void jTable6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable6MouseClicked
    jTextField17.setEnabled(false);
    jTextField18.setEnabled(false);
    jTextField19.setEnabled(false);
    jTextField20.setEnabled(false);
    jTextArea1.setEnabled(false);
    jTextField7.setEnabled(false);
    jTextField9.setEnabled(false);

    conn.conectar();
    int fila = jTable6.getSelectedRow();
    if (jTable6.getSelectedRow() >= 0) {
        String[] datosLeidos = {
            String.valueOf(jTable6.getValueAt(jTable6.getSelectedRow(), 0)),};

        try {
            java.sql.Statement stmt = conn.getConexion().createStatement();
            String buscar = datosLeidos[0];
            rss = stmt.executeQuery("select * from procc where id_pro='" + buscar + "'");
            if (rss.next()) {

                jTextField17.setText(rss.getString(2));
                jTextField18.setText(rss.getString(3));
                jTextField19.setText(rss.getString(6));
                //String cad=Float.toString(getInt(5));
                jTextField7.setText(rss.getString(4));
                jTextField9.setText(rss.getString(5));
                jTextField20.setText(rss.getString(7));
                jTextArea1.setText(rss.getString(8));

                //LAMA METODO FOTOO PARA VER IMAGEN EN JTABLE
                ImageIcon img;
                //      buscar= rs.getString(1);
                img = foto_producto(buscar);
                if (img == null) {
                    jLabel51.setIcon(ajustarImagen2());

                } else {
                    Icon icono = new ImageIcon(img.getImage().getScaledInstance(jLabel51.getWidth(), jLabel51.getHeight(), Image.SCALE_DEFAULT));

                    jLabel51.setIcon(icono);
                    jLabel51.updateUI();
                }
            }

        } catch (SQLException ex) {
            //    JOptionPane.showMessageDialog(null, ex.getMessage());
        }

    }
}//GEN-LAST:event_jTable6MouseClicked

private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton21ActionPerformed
    //JPCPMBPBNPX EN JAVA PRODUCTO /COMPRA
    if (jComboBox9.getItemCount() <= 0) {
        agregar_produc();
        combo_producto();
    } else {
        agregar_produc();
    }
}//GEN-LAST:event_jButton21ActionPerformed

private void jButton20ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton20ActionPerformed
    if (jTextField17.getText().trim().length() == 0 || jTextField18.getText().trim().length() == 0
            || jTextField20.getText().trim().length() == 0) {
        JOptionPane.showMessageDialog(this, "Algun campo está vacío");
    } else {
        int fila = jTable6.getSelectedRow();
        if (jTable6.getSelectedRow() >= 0) {
            String[] datosLeidos = {
                String.valueOf(jTable6.getValueAt(jTable6.getSelectedRow(), 0)),
                String.valueOf(jTable6.getValueAt(jTable6.getSelectedRow(), 1)),};
        }
        String nomb = (String) jTable6.getValueAt(fila, 0).toString();
        Float idpro = Float.valueOf(nomb);
        try {
            con.conectar();
            con.getConexion();
            PreparedStatement stmtt = null;

            CallableStatement prcProcedimientoAlmacenado = con.getConexion().prepareCall("{ call act_producto(?,?,?,?,?,?,?,?,?) }");
            prcProcedimientoAlmacenado.setFloat(1, idpro);
            prcProcedimientoAlmacenado.setString(2, jTextField17.getText());
            prcProcedimientoAlmacenado.setString(3, jTextField18.getText());
            prcProcedimientoAlmacenado.setString(4, jTextField19.getText());
            float aa = Float.valueOf(this.jTextField20.getText());
            prcProcedimientoAlmacenado.setFloat(5, aa);
            prcProcedimientoAlmacenado.setString(6, jTextArea1.getText());
            int max = Integer.parseInt(jTextField7.getText());
            int min = Integer.parseInt(jTextField9.getText());
            prcProcedimientoAlmacenado.setInt(7, max);
            prcProcedimientoAlmacenado.setInt(8, min);
            prcProcedimientoAlmacenado.setBlob(9, dis);
            prcProcedimientoAlmacenado.executeUpdate();
            JOptionPane.showMessageDialog(this, "Se actualizo el registro");
            buscar_producto();
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
    }
}//GEN-LAST:event_jButton20ActionPerformed

private void jButton19ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton19ActionPerformed
    buscar_producto();
}//GEN-LAST:event_jButton19ActionPerformed
    public void del() {
        try {
            java.sql.Statement stmt = con.getConexion().createStatement();
            rss = stmt.executeQuery("select * from almacen");
            rs = stmt.executeQuery("select max(id_pro)as idd from producto");

            if (rs.next()) {
                int dat = Integer.parseInt(rs.getString("idd"));
                rr = stmt.executeQuery("alter sequence inc increment by -" + dat);
                rsi = stmt.executeQuery("alter sequence inc increment by " + 1);

                rss = stmt.executeQuery("delete from producto ");
                jTextField18.setText("");
                jTextField19.setText("");
                jTextField20.setText("");
                jTextField17.setText("");
                jTextArea1.setText("");

                //REMOVER ELEMENTO DE JTABLE
                DefaultTableModel modelo = (DefaultTableModel) jTable6.getModel();
                int filas = jTable6.getRowCount();
                for (int i = 0; filas > i; i++) {
                    modelo.removeRow(0);
                }
                JOptionPane.showMessageDialog(null, "Los registros han sido eliminados satisfactoriamente");
            } else {
                JOptionPane.showMessageDialog(this, "No se encontraron datos");
            }
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(this, "Error " + ex.getMessage());
        }
    }

private void jButton18ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton18ActionPerformed
    try {
        java.sql.Statement stmt = con.getConexion().createStatement();
        rss = stmt.executeQuery("select producto from almacen al,producto pro where al.producto=pro.nom_producto");
        if (rss.next()) {
            int axx = JOptionPane.showConfirmDialog(null, "Unos productos estan siendo utilizados si los elimina serán eliminados en almacen Desea eliminar los registros");
            if (axx == JOptionPane.YES_OPTION) {
                rs = stmt.executeQuery("delete from almacen");
                del();
            } else if (axx == JOptionPane.NO_OPTION) {
            }

        } else {
            int axx = JOptionPane.showConfirmDialog(null, "Desea eliminar los registros");
            if (axx == JOptionPane.YES_OPTION) {
                del();
            } else if (axx == JOptionPane.NO_OPTION) {
            }
        }
    } catch (SQLException ex) {
        JOptionPane.showMessageDialog(null, ex.getMessage());
    }

}//GEN-LAST:event_jButton18ActionPerformed

private void jTextArea1KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextArea1KeyTyped
    jTextArea1.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (jTextArea1.getText()).toUpperCase();
            jTextArea1.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_jTextArea1KeyTyped

private void jTextField19KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField19KeyTyped
}//GEN-LAST:event_jTextField19KeyTyped

private void jTextField18KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField18KeyTyped
    jTextField18.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (jTextField18.getText()).toUpperCase();
            jTextField18.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_jTextField18KeyTyped

private void jTextField18ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField18ActionPerformed
}//GEN-LAST:event_jTextField18ActionPerformed

private void jTextField17KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField17KeyTyped
    jTextField17.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (jTextField17.getText()).toUpperCase();
            jTextField17.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_jTextField17KeyTyped

private void jTextField17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField17ActionPerformed
}//GEN-LAST:event_jTextField17ActionPerformed

private void jLabel51MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel51MouseClicked
}//GEN-LAST:event_jLabel51MouseClicked

private void jButton15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton15ActionPerformed
    try {
        java.sql.Statement ab = con.getConexion().createStatement();
        rr = ab.executeQuery("select * from almacen");
        if (rr.next()) {
              modeloLista.clear();
            con.conectar();
            java.sql.Statement stmt = con.getConexion().createStatement();
            rs = stmt.executeQuery("SELECT producto FROM almacen");
            while (rs.next()) {
                modeloLista.addElement(rs.getString("producto"));
                jList1.setModel(modeloLista);
            }
        } else {
      JOptionPane.showMessageDialog(null,"No se ha encontrado ningún producto");
        }
    } catch (Exception ex) {
        JOptionPane.showMessageDialog(null, ex.getMessage());
    }
}//GEN-LAST:event_jButton15ActionPerformed

private void jList1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jList1MouseClicked
    String art = jList1.getSelectedValue().toString();

    try {
        java.sql.Statement stmt = con.getConexion().createStatement();
        String buscar = art;
        rs = stmt.executeQuery("select producto,cantidad_alm from almacen where producto='" + buscar + "'");
        if (rs.next()) {
            jLabel109.setText(rs.getString("producto"));
            jLabel58.setText(rs.getString("cantidad_alm"));
        }
        rss = stmt.executeQuery("select nom_producto,categoria,descrip,foto from producto pro,detalle_producto det "
                + "where pro.id_pro = det.id_pro and nom_producto='" + buscar + "'");
        ImageIcon img;
        //      buscar= rs.getString(1);
        img = fotoAlmacen(buscar);
        if (rss.next()) {

            jLabel6.setText(rss.getString("categoria"));
            jLabel59.setText(rss.getString("descrip"));
            //LAMA METODO FOTOO PARA VER IMAGEN EN JTABLE

            if (img == null) {
                jLabel84.setIcon(imagenAlmacen());

            } else {
                Icon icono = new ImageIcon(img.getImage().getScaledInstance(jLabel84.getWidth(), jLabel84.getHeight(), Image.SCALE_DEFAULT));
                jLabel84.setIcon(icono);
                jLabel84.updateUI();
            }
        } else {
            jLabel6.setText("Sin categoría");
            jLabel59.setText("Sin descripción");
            ////////////// SIN FOTOGRAFIA
            if (img == null) {
                jLabel84.setIcon(imagenAlmacen());

            } else {
                Icon icono = new ImageIcon(img.getImage().getScaledInstance(jLabel84.getWidth(), jLabel84.getHeight(), Image.SCALE_DEFAULT));
                jLabel84.setIcon(icono);
                jLabel84.updateUI();
            }
        }

    } catch (Exception ex) {
        JOptionPane.showMessageDialog(null, ex.getMessage());
    }
}//GEN-LAST:event_jList1MouseClicked
    public void add_user() {
        try {
            if (jTextField25.getText().trim().length() == 0
                    || jPasswordField1.getText().trim().length() == 0) {
                JOptionPane.showMessageDialog(this, "Algún campo esta vacío");
            } else {
                if (jPasswordField1.getText().equals(jPasswordField3.getText())) {

                    java.sql.Statement stmt = con.getConexion().createStatement();
                    java.sql.Statement stm = con.getConexion().createStatement();
                    String buscar = (String) this.jTextField25.getText();
                    String ss = (String) this.jComboBox1.getSelectedItem().toString();
                    rss = stmt.executeQuery("select * from usuarios where nombre_usuario like '%" + buscar + "%' ");
                    rr = stm.executeQuery("select * from usuarios where id_per like '%" + ss + "%' ");
                    if (rr.next()) {
                        JOptionPane.showMessageDialog(null, "El usuario con este codigo " + ss + " ya tiene una cuenta");
                    } else {
                        if (rss.next()) {
                            JOptionPane.showMessageDialog(null, "El usuario " + jTextField25.getText() + " ya existe");
                        } else {

                            CallableStatement stmtt = con.getConexion().prepareCall("{ call insertar_usuario (?,?,?,?,?,?) }");
                            stmtt.setString(1, jComboBox1.getSelectedItem().toString());
                            stmtt.setString(2, jTextField25.getText());
                            stmtt.setString(3, jPasswordField1.getText());
                            stmtt.setString(4, users.getSelectedItem().toString());
                            stmtt.setString(5, hora());
                            stmtt.setString(6, fecha());
                            stmtt.executeUpdate();
                            //INCLUIR USUARIOS EN LISTA DE USUARIOS
                            modeloLista1.addElement(jTextField25.getText());
                            jList2.setModel(modeloLista1);
                            //PONER FOCO EN JTABLEPANE1
                            jTabbedPane1.requestFocusInWindow();
                        }
                    }
                    jTextField25.setText("");
                    jPasswordField1.setText("");
                    jPasswordField3.setText("");
                    jTabbedPane1.requestFocusInWindow();
                } else {
                    JOptionPane.showMessageDialog(null, "Las constraseñas que introdujo no son iguales");
                    jPasswordField1.setText("");
                    jPasswordField3.setText("");
                    jTabbedPane1.requestFocusInWindow();
                }
            }
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(null, "no se pudo registrar sus datos : " + ex.getMessage());
            jTabbedPane1.requestFocusInWindow();
        }
    }
private void jButton24ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton24ActionPerformed
    add_user();
}//GEN-LAST:event_jButton24ActionPerformed

private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox1ActionPerformed
    try {
        con.conectar();
        java.sql.Statement stmt = con.getConexion().createStatement();
        rs = stmt.executeQuery("select nombre from personas where  id_per='" + jComboBox1.getSelectedItem().toString() + "'");
        if (rs.next()) {
            nom4.setText(rs.getString("nombre"));
        }

    } catch (SQLException ex) {
    }
}//GEN-LAST:event_jComboBox1ActionPerformed

private void jTextField5KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField5KeyTyped
    jTextField5.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (jTextField5.getText()).toUpperCase();
            jTextField5.setText(cadena);
            repaint();
            filtro();
        }
    });
    trsfiltro = new TableRowSorter(jTable4.getModel());
    jTable4.setRowSorter(trsfiltro);
}//GEN-LAST:event_jTextField5KeyTyped

private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField5ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_jTextField5ActionPerformed

private void jTable4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable4MouseClicked
    Ver_datos();

    //Seleccion de filasen JTABLE
    int fila = jTable4.getSelectedRow();
    if (jTable4.getSelectedRow() >= 0) {
        String[] datosLeidos = {
            String.valueOf(jTable4.getValueAt(jTable4.getSelectedRow(), 0)),};
        RFC.setText(datosLeidos[0]);

    }
}//GEN-LAST:event_jTable4MouseClicked

private void BuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BuscarActionPerformed
    Busqueda();
}//GEN-LAST:event_BuscarActionPerformed

private void ActualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ActualizarActionPerformed
    if (jTextField11.getText().trim().length() == 0 && person.getText().trim().length() == 0 && nomm.getText().trim().length() == 0
            && jTextField33.getText().trim().length() == 0 && sex.getText().trim().length() == 0 && jTextField13.getText().trim().length() == 0 && jTextField14.getText().trim().length() == 0
            && jTextField15.getText().trim().length() == 0 && nom1.getText().trim().length() == 0 && nom2.getText().trim().length() == 0
            && col1.getText().trim().length() == 0) {
        JOptionPane.showMessageDialog(this, "Verifique que ningun campo este vacío");
    } else {

        try {

            CallableStatement prcProcedimientoAlmacenado = con.getConexion().prepareCall("{ call modificar(?,?,?,?,?,?,?,?) }");
            prcProcedimientoAlmacenado.setString(1, RFC.getText());
            prcProcedimientoAlmacenado.setString(2, person.getText());
            prcProcedimientoAlmacenado.setString(3, nomm.getText());
            prcProcedimientoAlmacenado.setString(4, sex.getText());
            prcProcedimientoAlmacenado.setString(5, jTextField13.getText());
            prcProcedimientoAlmacenado.setString(6, jTextField11.getText());
            prcProcedimientoAlmacenado.setString(7, fecha());
            prcProcedimientoAlmacenado.setBlob(8, dis);
            prcProcedimientoAlmacenado.executeUpdate();

            CallableStatement stmtt = con.getConexion().prepareCall("{ call mod_dir (?,?,?,?,?,?) }");
            stmtt.setString(1, RFC.getText());
            stmtt.setString(2, nom1.getText());
            stmtt.setString(3, nom2.getText());
            stmtt.setString(4, col1.getText());
            stmtt.setString(5, jTextField14.getText());
            stmtt.setString(6, jTextField15.getText());
            stmtt.executeUpdate();

            JOptionPane.showMessageDialog(this, "Se actualizo el registro" + jTextField6.getText());
            person.setText("");
            nomm.setText("");
            jTextField33.setText("");
            sex.setText("");
            jTextField11.setText("");
            jTextField13.setText("");
            jTextField14.setText("");
            jTextField15.setText("");
            nom1.setText("");
            nom2.setText("");
            col1.setText("");
            Busqueda();
            jTabbedPane1.requestFocusInWindow();
        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, e.getMessage());
        }
    }
}//GEN-LAST:event_ActualizarActionPerformed

private void Eliminar_registrosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Eliminar_registrosActionPerformed
    con.conectar();
    try {
        java.sql.Statement stmt = con.getConexion().createStatement();
        int axx = JOptionPane.showConfirmDialog(null, "Desea eliminar los registros");
        if (axx == JOptionPane.YES_OPTION) {
            rss = stmt.executeQuery("delete from personas ");
            jTextField1.setText("");
            person.setText("");
            RFC.setText("");
            sex.setText("");
            jTextField11.setText("");
            jTextField13.setText("");
            nom1.setText("");
            nom2.setText("");
            jTextField14.setText("");
            jTextField15.setText("");
            col1.setText("");
            nomm.setText("");
            col.setText("");
            //REMOVER ELEMENTO DE JTABLE
            DefaultTableModel modelo = (DefaultTableModel) jTable4.getModel();
            int filas = jTable4.getRowCount();
            for (int i = 0; filas > i; i++) {
                modelo.removeRow(0);
            }
            int a = modelo.getRowCount() - 1;
            for (int i = a; i >= 0; i--) {
                modelo.removeRow(i);
            }
            JOptionPane.showMessageDialog(null, "Los registros han sido eliminados satisfactoriamente");
            LOGIN log = new LOGIN();
            log.setVisible(true);
            dispose();
        } else if (axx == JOptionPane.NO_OPTION) {
        }
    } catch (SQLException ex) {
        JOptionPane.showMessageDialog(this, "Error " + ex.getMessage());
    }
}//GEN-LAST:event_Eliminar_registrosActionPerformed

private void nom1KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nom1KeyTyped
    char c = evt.getKeyChar();
    if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && (c != (char) KeyEvent.VK_SPACE)) {
        evt.consume();
    }
}//GEN-LAST:event_nom1KeyTyped

private void nom1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nom1ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_nom1ActionPerformed

private void jTextField14KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField14KeyTyped
    char c = evt.getKeyChar();
    if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && (c != (char) KeyEvent.VK_SPACE)) {
        evt.consume();
    }
    jTextField14.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (jTextField14.getText()).toUpperCase();
            jTextField14.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_jTextField14KeyTyped

private void jTextField14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField14ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_jTextField14ActionPerformed

private void col1KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_col1KeyTyped
    char c = evt.getKeyChar();
    if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && (c != (char) KeyEvent.VK_SPACE)) {
        evt.consume();
    }
    col1.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (col1.getText()).toUpperCase();
            col1.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_col1KeyTyped

private void col1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_col1ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_col1ActionPerformed

private void jTextField15KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField15KeyTyped
    char c = evt.getKeyChar();
    if (jTextField8.getText().length() >= 3) {
        evt.consume();
    }
    if (c < '0' || c > '9') {
        evt.consume();
    }
}//GEN-LAST:event_jTextField15KeyTyped

private void jTextField15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField15ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_jTextField15ActionPerformed

private void nom2KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nom2KeyTyped
    nom2.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (nom2.getText()).toUpperCase();
            nom2.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_nom2KeyTyped

private void nom2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nom2ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_nom2ActionPerformed

private void sexKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_sexKeyTyped
    sex.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (sex.getText()).toUpperCase();
            sex.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_sexKeyTyped

private void nommKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nommKeyTyped
    nomm.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (nomm.getText()).toUpperCase();
            nomm.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_nommKeyTyped

private void personKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_personKeyTyped
    person.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (person.getText()).toUpperCase();
            person.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_personKeyTyped

private void jLabel32MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel32MouseClicked
}//GEN-LAST:event_jLabel32MouseClicked
    public void add_persona() {
        try {
            if (ImageIcon.class.equals(jLabel30)) {
            } else {
                if (jComboBox10.getSelectedItem().toString() != "Seleccione") {
                    if (jTextField6.getText().trim().length() == 0
                            && jTextField4.getText().trim().length() == 0 && jTextField10.getText().trim().length() == 0 && nom.getText().trim().length() == 0
                            && col.getText().trim().length() == 0 && jTextField8.getText().trim().length() == 0) {
                        JOptionPane.showMessageDialog(this, "Algun campo está vacío");
                    } else {
                        //COMPROBAR SI EXISTEN REGISTROS
                        java.sql.Statement sm = con.getConexion().createStatement();
                        String msn = (String) this.jTextField33.getText() + correo.getSelectedItem().toString();
                        cor = sm.executeQuery("select * from personas where correo like '%" + msn + "%' ");

                        java.sql.Statement sS = con.getConexion().createStatement();
                        String tell = (String) this.tel.getText();
                        tels = sS.executeQuery("select * from personas where numero_telefono like '%" + tell + "%' ");

                        java.sql.Statement stmt = con.getConexion().createStatement();
                        String buscar = (String) this.id_persona.getText();
                        rss = stmt.executeQuery("select * from personas where id_per like '%" + buscar + "%' ");
                        if (tels.next()) {
                            JOptionPane.showMessageDialog(null, "Ya existe numero telefónico " + tell);
                        } else {
                            if (cor.next()) {
                                JOptionPane.showMessageDialog(null, "Este correo ya existe ,favor de poner una distinta");
                            } else {
                                if (rss.next()) {
                                    JOptionPane.showMessageDialog(null, "El codigo " + buscar + " ya existe");
                                } else {
                                    CallableStatement prcProcedimientoAlmacenado = con.getConexion().prepareCall("{ call insertar_persona(?,?,?,?,?,?,?,?) }");
                                    prcProcedimientoAlmacenado.setString(1, id_persona.getText());
                                    prcProcedimientoAlmacenado.setString(2, jTextField6.getText());
                                    prcProcedimientoAlmacenado.setString(3, jTextField4.getText());
                                    prcProcedimientoAlmacenado.setString(4, jComboBox10.getSelectedItem().toString());
                                    prcProcedimientoAlmacenado.setString(5, jTextField33.getText() + correo.getSelectedItem().toString());
                                    prcProcedimientoAlmacenado.setString(6, tel.getText());
                                    prcProcedimientoAlmacenado.setString(7, fecha());
                                    prcProcedimientoAlmacenado.setBlob(8, dis);
                                    prcProcedimientoAlmacenado.executeUpdate();
                                    //REGISTRO DOMICILIO
                                    CallableStatement stmtt = con.getConexion().prepareCall("{ call insertar_direccion (?,?,?,?,?,?) }");
                                    stmtt.setString(1, id_persona.getText());
                                    stmtt.setString(2, estados.getSelectedItem().toString());
                                    stmtt.setString(3, nom.getText());
                                    stmtt.setString(4, col.getText());
                                    stmtt.setString(5, jTextField10.getText());
                                    stmtt.setString(6, jTextField8.getText());
                                    stmtt.executeUpdate();
                                    // introducir id en combobox de usuario
                                    jComboBox1.addItem(id_persona.getText());

                                    CallableStatement stm = con.getConexion().prepareCall("{ call tipo_person (?,?,?) }");
                                    stm.setString(1, id_persona.getText());
                                    stm.setString(2, id_persona.getText());
                                    stm.setString(3, personas.getSelectedItem().toString());
                                    stm.executeUpdate();

                                    if (personas.getSelectedItem().toString().equals("TRABAJADOR")) {

                                        limpiar();
                                    } else {
                                        if (personas.getSelectedItem().toString().equals("PROVEEDOR") || personas.getSelectedItem().toString().equals("CLIENTE")) {
                                            JOptionPane.showMessageDialog(this, "Sus datos han sido registrados");
                                            limpiar();

                                        } else {
                                            if (personas.getSelectedItem().toString().equals("ADMINISTRADOR")) {
                                                jTabbedPane3.setSelectedIndex(2);
                                                limpiar();
                                                jTabbedPane1.requestFocusInWindow();
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                } else {
                    JOptionPane.showMessageDialog(this, "No ha seleccionado su sexo");
                }

            }
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
    }
private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton13ActionPerformed
    add_persona();
}//GEN-LAST:event_jButton13ActionPerformed

private void estadosKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_estadosKeyTyped
}//GEN-LAST:event_estadosKeyTyped

private void jTextField10KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField10KeyTyped
    char c = evt.getKeyChar();
    if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && (c != (char) KeyEvent.VK_SPACE)) {
        evt.consume();
    }
    //CAMBIAR MINUSCULA A MAYUSCULA CUANDO SE ESCRIBE ENJTEXTFIELD
    jTextField10.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (jTextField10.getText()).toUpperCase();
            jTextField10.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_jTextField10KeyTyped

private void jTextField10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField10ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_jTextField10ActionPerformed

private void jTextField8KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField8KeyTyped
    char c = evt.getKeyChar();
    if (jTextField8.getText().length() >= 3) {
        evt.consume();
    }
    if (c < '0' || c > '9') {
        evt.consume();
    }
}//GEN-LAST:event_jTextField8KeyTyped

private void jTextField8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField8ActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_jTextField8ActionPerformed

private void colKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_colKeyTyped
    char c = evt.getKeyChar();
    if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && (c != (char) KeyEvent.VK_SPACE)) {
        evt.consume();
    }
    col.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (col.getText()).toUpperCase();
            col.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_colKeyTyped

private void colActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_colActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_colActionPerformed

private void nomKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nomKeyTyped
    char c = evt.getKeyChar();
    if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && (c != (char) KeyEvent.VK_SPACE)) {
        evt.consume();
    }
    nom.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (nom.getText()).toUpperCase();
            nom.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_nomKeyTyped

private void nomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nomActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_nomActionPerformed

private void telKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_telKeyTyped
    char car = evt.getKeyChar();
    if (tel.getText().length() >= 10) {
        evt.consume();
    }
    if ((car < '1' || car > '9')) {
        evt.consume();
    }
}//GEN-LAST:event_telKeyTyped

private void correoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_correoActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_correoActionPerformed

private void personasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_personasActionPerformed
    // TODO add your handling code here:
}//GEN-LAST:event_personasActionPerformed

private void jTextField6KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField6KeyTyped
    jTextField6.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (jTextField6.getText()).toUpperCase();
            jTextField6.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_jTextField6KeyTyped

private void jTextField4KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField4KeyTyped
    jTextField4.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (jTextField4.getText()).toUpperCase();
            jTextField4.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_jTextField4KeyTyped

private void id_personaKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_id_personaKeyTyped
    char car = evt.getKeyChar();
    if (id_persona.getText().length() >= 4) {
        evt.consume();
    }
    if ((car < '0' || car > '9') && (car < 'a' || car > 'z') && (car < 'A' || car > 'Z') && car != '-' && car != '_') {
        evt.consume();
    }
}//GEN-LAST:event_id_personaKeyTyped

private void jLabel30MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel30MouseClicked
    JFileChooser abrir = new JFileChooser();
    abrir.setFileSelectionMode(JFileChooser.FILES_ONLY);
    //FILTRO PARA ABRIR PURAS IMAGENES-----
    FileNameExtensionFilter filtroImagen = new FileNameExtensionFilter("JPG, PNG & GIF", "jpg", "png", "gif");
    abrir.setFileFilter(filtroImagen);
    int estado = abrir.showOpenDialog(null);
    if (estado == JFileChooser.APPROVE_OPTION) {
        try {
            dis = new FileInputStream(abrir.getSelectedFile());
            try {
                //Ajustar al label
                Image icono = ImageIO.read(abrir.getSelectedFile()).getScaledInstance(jLabel30.getWidth(), jLabel30.getHeight(), Image.SCALE_DEFAULT);
                jLabel30.setIcon(new ImageIcon(icono));

                jLabel30.updateUI();
            } catch (IOException ex) {
                JOptionPane.showMessageDialog(this, "No se encontro ninguna foto ");
            }

        } catch (FileNotFoundException ex) {
            JOptionPane.showMessageDialog(this, "No se encontro ninguna foto ");
        }

    }
}//GEN-LAST:event_jLabel30MouseClicked

private void jTextField32KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField32KeyPressed
    int key = evt.getKeyCode();
    if (key == KeyEvent.VK_ENTER) {
        agregar_producto();
    }
}//GEN-LAST:event_jTextField32KeyPressed

private void jButton22KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jButton22KeyPressed
}//GEN-LAST:event_jButton22KeyPressed

private void jButton22ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton22ActionPerformed
    agregar_producto();
}//GEN-LAST:event_jButton22ActionPerformed

private void jTextField1KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField1KeyTyped
    jTextField1.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (jTextField1.getText()).toUpperCase();
            jTextField1.setText(cadena);
            repaint();
        }
    });
}//GEN-LAST:event_jTextField1KeyTyped

private void jTextField1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField1KeyPressed
    int key = evt.getKeyCode();
    if (key == KeyEvent.VK_ENTER) {
        agregar_producto();
    }
}//GEN-LAST:event_jTextField1KeyPressed

private void jButton6KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jButton6KeyPressed
    // TODO add your handling code here:
}//GEN-LAST:event_jButton6KeyPressed

private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
    borrar_fila();
}//GEN-LAST:event_jButton6ActionPerformed

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
    //   new buscar(this, true).setVisible(true);

    Dialogo_Buscar.setSize(750, 450);
    Dialogo_Buscar.show();
    Dialogo_Buscar.setLocationRelativeTo(null);
    busca_producto();
}//GEN-LAST:event_jButton3ActionPerformed

private void TICKET1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TICKET1MouseClicked
    if (TICKET1.getSelectedIndex() == 1) {
        jTextField1.setEnabled(false);
        jTextField32.setEnabled(false);
        jButton22.setEnabled(false);
        jButton3.setEnabled(false);
        jButton6.setEnabled(false);
        jButton35.setEnabled(false);
    } else {
        if (TICKET1.getSelectedIndex() == 0) {
            jTextField1.setEnabled(true);
            jTextField32.setEnabled(true);
            jButton22.setEnabled(true);
            jButton3.setEnabled(true);
            jButton6.setEnabled(true);
            jButton35.setEnabled(true);
        }
    }
}//GEN-LAST:event_TICKET1MouseClicked
    public void suma_ventas_consulta() {
        int total = 0;
        //CUENTA DE CANTIDAD RE REGISTROS EN TABLA
        int numm = jTable10.getRowCount();
        String cant = String.valueOf(numm);
        jLabel11.setText(cant);
        //SUMATORIA DE PRODUCTOS
        int totalRow = jTable10.getRowCount();
        totalRow -= 1;
        for (int i = 0; i <= totalRow; i++) {
            int dato = Integer.parseInt(jTable10.getValueAt(i, 3).toString());
            total += dato;
        }
        jLabel12.setText(String.valueOf("$" + total));
    }
private void jButton37ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton37ActionPerformed
    consulta_ventas();
    suma_ventas_consulta();
}//GEN-LAST:event_jButton37ActionPerformed

private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed
    if (this.jTable1.getRowCount() != 0 && this.jTable1.getSelectedRow() != 0) {
        // EN ESTA PARTE REALIZA LA SUMA DE LA COLUMNA Q DESEAMOS
        int fila = jTable1.getRowCount();
        int row = jTable1.getRowCount();
        int total = 0;
        for (int i = 0; i < row; i++) {
            //---------EN ESTA PARTE QUITAMOS EL SINO DE PESOS PARA PODER SUMAR LA COLUMNA IMPORTE-------------------
            String dato = jTable1.getValueAt(i, 5).toString();
            String hot = "$";
            boolean ho = dato.contains(hot);
            if (ho) {
                String hotm = dato.replace("$", "");
                jTextField33.setText(hotm);

                total += Integer.parseInt(hotm);
            }
            //--------------------------------
        }
        String totalResult = Integer.toString(total);
        jLabel49.setText(totalResult);

        ////ENVIAMOS PAGO TOTAL A JDIALOG DE COBRAR
        Dialogo_Cobrar.setSize(550, 300);
        Dialogo_Cobrar.show();
        Dialogo_Cobrar.setLocationRelativeTo(null);
        precio_cobrar.setText(totalResult);
    } else {
        JOptionPane.showMessageDialog(null, "No ha insertado productos en ventas");
    }

}//GEN-LAST:event_jButton8ActionPerformed

private void jTable1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTable1KeyPressed
    int key = evt.getKeyCode();

    if (key == KeyEvent.VK_DELETE) {
        borrar_fila();
    }
}//GEN-LAST:event_jTable1KeyPressed

private void jTextField21KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField21KeyPressed
    int key = evt.getKeyCode();
    if (key == KeyEvent.VK_ENTER) {
        double precio = Double.parseDouble(precio_cobrar.getText());
        double paga = Double.parseDouble(jTextField21.getText());
        double cambioo = paga - precio;
        String cambio = String.valueOf(cambioo);
        jLabel96.setText("$" + cambio);
    }
}//GEN-LAST:event_jTextField21KeyPressed

private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
    for (int i = 0; i < jTable1.getRowCount(); i++) {
        String aa = String.valueOf(jTable1.getValueAt(i, 0));
        String a = String.valueOf(jTable1.getValueAt(i, 1));
        String b = String.valueOf(jTable1.getValueAt(i, 3));
        String c = String.valueOf(jTable1.getValueAt(i, 4));
        String d = String.valueOf(jTable1.getValueAt(i, 5));
        try {
            con.conectar();
            java.sql.Statement id = con.getConexion().createStatement();
            rs = id.executeQuery("select id_per from personas where nombre='" + recibe.getText() + "'");
            if (rs.next()) {
                CallableStatement prc = con.getConexion().prepareCall("{call ing_vent (?,?,?,?,?,?,?) }");
                int idd = Integer.parseInt(aa);
                prc.setInt(1, idd);
                prc.setString(2, b);
                int cant = Integer.parseInt(c);
                prc.setInt(3, cant);

                //  quitar el signo de pesos para introducir solo numero
                String dato = d;
                String hot = "$";
                boolean ho = dato.contains(hot);
                if (ho) {
                    String hotm = dato.replace("$", "");
                    int tot = Integer.parseInt(hotm);
                    prc.setInt(4, tot);
                }
                prc.setString(5, rs.getString("id_per"));
                prc.setString(6, fecha());
                prc.setString(7, hora());
                prc.executeUpdate();

                CallableStatement prc2 = con.getConexion().prepareCall("{call mod_almacen (?,?,?) }");
                prc2.setString(1, a);
                prc2.setInt(2, cant);
                prc2.setString(3, fecha());
                prc2.executeUpdate();
            } else {
            }
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }

    }
    JOptionPane.showMessageDialog(this, "Venta  registrada");
    int aaa = modelo2.getRowCount() - 1;
    for (int ii = aaa; ii >= 0; ii--) {
        modelo2.removeRow(ii);
    }
    suma_ventas();
    Dialogo_Cobrar.setVisible(false);
    jTextField21.setText("");
    jLabel96.setText("0");
}//GEN-LAST:event_jButton7ActionPerformed

private void jButton40ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton40ActionPerformed
    Dialogo_Buscar.setVisible(false);
}//GEN-LAST:event_jButton40ActionPerformed

private void jButton42ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton42ActionPerformed
    Dialogo_Cobrar.setVisible(false);
}//GEN-LAST:event_jButton42ActionPerformed
    public void pro_bajos() {
        try {
            int a = modelo8.getRowCount() - 1;
            for (int i = a; i >= 0; i--) {
                modelo8.removeRow(i);
            }

            con.conectar();
            java.sql.Statement stmt = con.getConexion().createStatement();

            java.sql.Statement st = con.getConexion().createStatement();
            rss = stmt.executeQuery("select * from pro_bajos where cantidad_alm<=10");
            if (rss.next()) {
                rs = st.executeQuery("select * from pro_bajos");

                rsm = rs.getMetaData();
                ArrayList<Object[]> data = new ArrayList<>();

                while (rs.next()) {
                    Object[] fila = new Object[5];
                    for (int i = 0; i < 4; i++) {
                        fila[i] = rs.getObject(i + 1);
                    }

                    modelo8.addRow(fila);

                    //ASIGNAR COLOR A PESTAÑA DE JTABLEPANEL
                    //   int indice = jTabbedPane1.getSelectedIndex();
                    jTabbedPane5.setBackgroundAt(2, Color.red);

                }
            } else {
                jTabbedPane5.setBackgroundAt(2, null);
            }
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, "Error: " + ex.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
        }
    }
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
    try {
        con.conectar();
        java.sql.Statement tt = con.getConexion().createStatement();
        rs = tt.executeQuery("select * from pro_bajos");
        if (rs.next()) {
            pro_bajos();
        } else {
            JOptionPane.showMessageDialog(null, "No hay productos con baja cantidad en existencia");
        }

    } catch (Exception ex) {
        JOptionPane.showMessageDialog(null, ex.getMessage());
    }
}//GEN-LAST:event_jButton2ActionPerformed

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
    con.conectar();
    try {
        java.sql.Statement stmt = con.getConexion().createStatement();
        int axx = JOptionPane.showConfirmDialog(null, "Desea eliminar los registros");
        if (axx == JOptionPane.YES_OPTION) {
            rss = stmt.executeQuery("delete from ventas ");
            jTextField12.setText("");
            //REMOVER ELEMENTO DE JTABLE
            DefaultTableModel modelo = (DefaultTableModel) jTable10.getModel();
            int filas = jTable10.getRowCount();
            for (int i = 0; filas > i; i++) {
                modelo.removeRow(0);
            }
            int a = modelo.getRowCount() - 1;
            for (int i = a; i >= 0; i--) {
                modelo.removeRow(i);
            }
            JOptionPane.showMessageDialog(null, "Los registros han sido eliminados satisfactoriamente");
        } else if (axx == JOptionPane.NO_OPTION) {
        }
    } catch (SQLException ex) {
        JOptionPane.showMessageDialog(this, "Error " + ex.getMessage());
    }
}//GEN-LAST:event_jButton5ActionPerformed

private void jList2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jList2MouseClicked
    String art = jList2.getSelectedValue().toString();
    try {
        java.sql.Statement stmt = con.getConexion().createStatement();
        String buscar = art;
        rss = stmt.executeQuery("select * from lista where nombre_usuario='" + buscar + "'");
        if (rss.next()) {
            jLabel106.setText(rss.getString("id_per"));
            jLabel97.setText(rss.getString("nombre"));
            jLabel102.setText(rss.getString("tipo_usuario"));
            jLabel103.setText(rss.getString("CONTRASEÑA"));
            jLabel104.setText(rss.getString("fecha_registro"));
        }
    } catch (SQLException ex) {
        JOptionPane.showMessageDialog(null, ex.getMessage());
    }
}//GEN-LAST:event_jList2MouseClicked

private void jTextField26KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField26KeyPressed
}//GEN-LAST:event_jTextField26KeyPressed

private void jTextField32KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField32KeyTyped
    char car = evt.getKeyChar();
    if (jTextField32.getText().length() >= 4) {
        evt.consume();
    }
    if ((car < '0' || car > '9')) {
        evt.consume();
    }
}//GEN-LAST:event_jTextField32KeyTyped

    private void DeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DeleteActionPerformed
        String elemento = jList1.getSelectedValue().toString();
        try {
            java.sql.Statement stmt = con.getConexion().createStatement();
            String buscar = elemento;
            rss = stmt.executeQuery("select * from almacen where producto='" + buscar + "'");
            if (rss.next()) {
                PreparedStatement pst = con.getConexion().prepareStatement("DELETE FROM almacen WHERE producto='" + buscar + "'");
                pst.executeUpdate();
                int selec = jList1.getSelectedIndex();
                modeloLista.remove(selec);
            }

        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(null, ex.getMessage());
        }

    }//GEN-LAST:event_DeleteActionPerformed
    public void filtro4() {
        if (jComboBox4.getSelectedItem().equals("PRODUCTO")) {
            trsfiltro.setRowFilter(RowFilter.regexFilter(jTextField12.getText(), 1));
            suma_ventas_consulta();
        } else {
            if (jComboBox4.getSelectedItem().equals("FECHA DE VENTA")) {
                trsfiltro.setRowFilter(RowFilter.regexFilter(jTextField12.getText(), 5));
                suma_ventas_consulta();
            } else {
                if (jComboBox4.getSelectedItem().equals("USUARIO")) {
                    trsfiltro.setRowFilter(RowFilter.regexFilter(jTextField12.getText(), 4));
                    suma_ventas_consulta();
                }
            }
        }
    }
    private void jTextField12KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField12KeyTyped
        jTextField12.addKeyListener(new KeyAdapter() {
            public void keyReleased(final KeyEvent e) {
                String cadena = (jTextField12.getText()).toUpperCase();
                jTextField12.setText(cadena);
                repaint();
                filtro4();
            }
        });
        trsfiltro = new TableRowSorter(jTable10.getModel());
        jTable10.setRowSorter(trsfiltro);
    }//GEN-LAST:event_jTextField12KeyTyped

    private void jPasswordField3KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jPasswordField3KeyPressed
        int key = evt.getKeyCode();
        if (key == KeyEvent.VK_ENTER) {
            add_user();
        }
    }//GEN-LAST:event_jPasswordField3KeyPressed

    private void jTextField20KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField20KeyPressed
        int key = evt.getKeyCode();
        if (key == KeyEvent.VK_ENTER) {
            agregar_produc();
        }
    }//GEN-LAST:event_jTextField20KeyPressed

    private void jTextField9KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField9KeyPressed
        int key = evt.getKeyCode();
        if (key == KeyEvent.VK_ENTER) {
            agregar_produc();
        }
    }//GEN-LAST:event_jTextField9KeyPressed

    private void jTextArea1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextArea1KeyPressed
        int key = evt.getKeyCode();
        if (key == KeyEvent.VK_ENTER) {
            agregar_produc();
        }
    }//GEN-LAST:event_jTextArea1KeyPressed

    private void jSpinner1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jSpinner1KeyPressed
    }//GEN-LAST:event_jSpinner1KeyPressed

    private void jTextField8KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField8KeyPressed
        int key = evt.getKeyCode();
        if (key == KeyEvent.VK_ENTER) {
            add_persona();
        }
    }//GEN-LAST:event_jTextField8KeyPressed

    private void Editar_listaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Editar_listaActionPerformed
        String art = jList2.getSelectedValue().toString();
        try {
            //  nom4.setEditable(false);
            //  jTextField25.setEditable(false);
            //  jPasswordField1.setEditable(false);
            //  jPasswordField3.setEditable(false);
            jComboBox1.setVisible(false);
            jTextField3.setVisible(true);
            jTextField3.setEditable(false);
            java.sql.Statement stmt = con.getConexion().createStatement();
            String buscar = art;
            rss = stmt.executeQuery("select * from lista where nombre_usuario='" + buscar + "'");
            if (rss.next()) {
                jTextField3.setText(rss.getString("id_per"));
                nom4.setText(rss.getString("nombre"));
                jTextField25.setText(rss.getString("nombre_usuario"));
                jPasswordField1.setText(rss.getString("CONTRASEÑA"));
                jPasswordField3.setText(rss.getString("CONTRASEÑA"));
            }
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(null, ex.getMessage());
        }
    }//GEN-LAST:event_Editar_listaActionPerformed

    private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
        if (jTextField25.getText().trim().length() == 0 && jPasswordField1.getText().trim().length() == 0
                && jPasswordField1.getText().trim().length() == 0) {
            JOptionPane.showMessageDialog(this, "Verifique que ningún campo este vacío");

        } else {
            try {
                if (jPasswordField1.getText().equals(jPasswordField3.getText())) {
                    CallableStatement prcProcedimientoAlmacenado = con.getConexion().prepareCall("{ call mod_user(?,?,?,?) }");
                    prcProcedimientoAlmacenado.setString(1, jTextField3.getText());
                    prcProcedimientoAlmacenado.setString(2, jTextField25.getText());
                    prcProcedimientoAlmacenado.setString(3, jPasswordField1.getText());
                    prcProcedimientoAlmacenado.setString(4, users.getSelectedItem().toString());
                    prcProcedimientoAlmacenado.executeUpdate();
                    jTextField3.setText("");
                    jTextField25.setText("");
                    jPasswordField1.setText("");
                    jPasswordField3.setText("");
                    nom4.setText("");
                    jComboBox1.setVisible(true);
                    jTextField3.setVisible(false);
                    jList2.removeAll();
                    JOptionPane.showMessageDialog(null, "Sus datos fue actualizado");
                    lista_user();
                    jTabbedPane1.requestFocusInWindow();
                } else {
                    JOptionPane.showMessageDialog(null, "Las constraseñas que introdujo no son iguales");
                    jPasswordField1.setText("");
                    jPasswordField3.setText("");
                }

            } catch (Exception ex) {
                JOptionPane.showMessageDialog(null, "Surgio un error al actualizar sus datos");
                jTabbedPane1.requestFocusInWindow();
            }
        }
    }//GEN-LAST:event_jButton10ActionPerformed

    private void jButton25ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton25ActionPerformed
        nom4.setText("");
        jTextField25.setText("");
        jPasswordField1.setText("");
        jPasswordField3.setText("");
        jTextField3.setText("");
        jTextField3.setVisible(false);
        jComboBox1.setVisible(true);
        jTabbedPane1.requestFocusInWindow();
    }//GEN-LAST:event_jButton25ActionPerformed

    private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed
    }//GEN-LAST:event_jButton11ActionPerformed

    private void jTabbedPane5MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTabbedPane5MouseClicked
        if (jTabbedPane5.getSelectedIndex() == 2) {
            pro_bajos();
        }
    }//GEN-LAST:event_jTabbedPane5MouseClicked

    private void jButton44ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton44ActionPerformed
        new ACERCA(this, true).setVisible(true);
    }//GEN-LAST:event_jButton44ActionPerformed

    private void jTabbedPane1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTabbedPane1KeyPressed
        if (evt.getKeyCode() == KeyEvent.VK_F1) {
            jTabbedPane1.setSelectedIndex(0);
        }
        if (evt.getKeyCode() == KeyEvent.VK_F2) {
            jTabbedPane1.setSelectedIndex(1);
        }
        if (evt.getKeyCode() == KeyEvent.VK_F3) {
            jTabbedPane1.setSelectedIndex(2);
        }
        if (evt.getKeyCode() == KeyEvent.VK_F4) {
            jTabbedPane1.setSelectedIndex(3);
        }
        if (evt.getKeyCode() == KeyEvent.VK_F5) {
            jTabbedPane1.setSelectedIndex(4);
        }
    }//GEN-LAST:event_jTabbedPane1KeyPressed

    private void jPanel1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jPanel1KeyPressed

        if (evt.getKeyCode() == KeyEvent.VK_F2) {
            jTabbedPane1.setSelectedIndex(0);
        }
        if (evt.getKeyCode() == KeyEvent.VK_F3) {
            jTabbedPane1.setSelectedIndex(1);
        }
        if (evt.getKeyCode() == KeyEvent.VK_F4) {
            jTabbedPane1.setSelectedIndex(2);
        }
        if (evt.getKeyCode() == KeyEvent.VK_F5) {
            jTabbedPane1.setSelectedIndex(3);
        }
    }//GEN-LAST:event_jPanel1KeyPressed

    private void fondoKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_fondoKeyPressed
        // TODO add your handling code here:
    }//GEN-LAST:event_fondoKeyPressed

    private void formKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_formKeyPressed
    }//GEN-LAST:event_formKeyPressed

    private void jButton43ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton43ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton43ActionPerformed

    private void person1KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_person1KeyTyped
  person1.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (person1.getText()).toUpperCase();
            person1.setText(cadena);
            repaint();
        }
    });
    }//GEN-LAST:event_person1KeyTyped

    private void nomm1KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nomm1KeyTyped
    nomm1.addKeyListener(new KeyAdapter() {
        public void keyReleased(final KeyEvent e) {
            String cadena = (nomm1.getText()).toUpperCase();
            nomm1.setText(cadena);
            repaint();
        }
    });
    }//GEN-LAST:event_nomm1KeyTyped

    private void jTextField30KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField30KeyTyped
     char car = evt.getKeyChar();
    if (jTextField30.getText().length() >= 5) {
        evt.consume();
    }
    if ((car < '0' || car > '9')  && car != ':') {
        evt.consume();
    }
    }//GEN-LAST:event_jTextField30KeyTyped

    private void jTextField31KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField31KeyTyped
        char car = evt.getKeyChar();
    if (jTextField31.getText().length() >= 5) {
        evt.consume();
    }
    if ((car < '0' || car > '9')  && car != ':') {
        evt.consume();
    }
    }//GEN-LAST:event_jTextField31KeyTyped

    private void jTextField29KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField29KeyTyped
       char car = evt.getKeyChar();
        if (jTextField29.getText().length() >= 10) {
        evt.consume();
    }
    if ((car < '1' || car > '9')) {
        evt.consume();
    }
    }//GEN-LAST:event_jTextField29KeyTyped

    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new PRINCIPAL().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton Actualizar;
    private javax.swing.JButton Buscar;
    private javax.swing.JMenuItem Delete;
    private javax.swing.JDialog Dialogo_Buscar;
    private javax.swing.JDialog Dialogo_Cobrar;
    private javax.swing.JMenuItem Editar;
    private javax.swing.JMenuItem Editar1;
    private javax.swing.JMenuItem Editar_empleo;
    private javax.swing.JMenuItem Editar_lista;
    private javax.swing.JMenuItem Eliminar;
    private javax.swing.JMenuItem Eliminar1;
    private javax.swing.JMenuItem Eliminar_empleo;
    private javax.swing.JButton Eliminar_registros;
    private javax.swing.JPopupMenu Menu_foto;
    private javax.swing.JPopupMenu Menu_lista_almacen;
    private javax.swing.JPopupMenu Opciones_tabla;
    private javax.swing.JTextField RFC;
    public static javax.swing.ButtonGroup Sexo;
    private javax.swing.JTabbedPane TICKET1;
    private javax.swing.JPopupMenu Tabla_Empleos;
    private javax.swing.JCheckBox check;
    private javax.swing.JTextField col;
    private javax.swing.JTextField col1;
    private javax.swing.JTextField col2;
    private javax.swing.JComboBox correo;
    public static javax.swing.JComboBox estados;
    private javax.swing.JLabel fondo;
    private javax.swing.JMenuItem foto;
    private javax.swing.JPopupMenu foto_producto;
    private javax.swing.JTextField id_persona;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton11;
    private javax.swing.JButton jButton13;
    private javax.swing.JButton jButton14;
    private javax.swing.JButton jButton15;
    private javax.swing.JButton jButton16;
    private javax.swing.JButton jButton17;
    private javax.swing.JButton jButton18;
    private javax.swing.JButton jButton19;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton20;
    private javax.swing.JButton jButton21;
    private javax.swing.JButton jButton22;
    private javax.swing.JButton jButton23;
    private javax.swing.JButton jButton24;
    private javax.swing.JButton jButton25;
    private javax.swing.JButton jButton26;
    private javax.swing.JButton jButton27;
    private javax.swing.JButton jButton28;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton31;
    private javax.swing.JButton jButton32;
    private javax.swing.JButton jButton33;
    private javax.swing.JButton jButton34;
    private javax.swing.JButton jButton35;
    private javax.swing.JButton jButton36;
    private javax.swing.JButton jButton37;
    private javax.swing.JButton jButton38;
    private javax.swing.JButton jButton39;
    private javax.swing.JButton jButton40;
    private javax.swing.JButton jButton42;
    private javax.swing.JButton jButton43;
    private javax.swing.JButton jButton44;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JComboBox jComboBox10;
    private javax.swing.JComboBox jComboBox2;
    private javax.swing.JComboBox jComboBox3;
    private javax.swing.JComboBox jComboBox4;
    private javax.swing.JComboBox jComboBox5;
    private javax.swing.JComboBox jComboBox6;
    private javax.swing.JComboBox jComboBox7;
    private javax.swing.JComboBox jComboBox8;
    private javax.swing.JComboBox jComboBox9;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel100;
    private javax.swing.JLabel jLabel101;
    private javax.swing.JLabel jLabel102;
    private javax.swing.JLabel jLabel103;
    private javax.swing.JLabel jLabel104;
    private javax.swing.JLabel jLabel105;
    private javax.swing.JLabel jLabel106;
    private javax.swing.JLabel jLabel107;
    private javax.swing.JLabel jLabel108;
    private javax.swing.JLabel jLabel109;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel110;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel51;
    private javax.swing.JLabel jLabel52;
    private javax.swing.JLabel jLabel53;
    private javax.swing.JLabel jLabel54;
    private javax.swing.JLabel jLabel55;
    private javax.swing.JLabel jLabel56;
    private javax.swing.JLabel jLabel57;
    private javax.swing.JLabel jLabel58;
    private javax.swing.JLabel jLabel59;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel60;
    private javax.swing.JLabel jLabel61;
    private javax.swing.JLabel jLabel62;
    private javax.swing.JLabel jLabel63;
    private javax.swing.JLabel jLabel64;
    private javax.swing.JLabel jLabel65;
    private javax.swing.JLabel jLabel66;
    private javax.swing.JLabel jLabel67;
    private javax.swing.JLabel jLabel68;
    private javax.swing.JLabel jLabel69;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel70;
    private javax.swing.JLabel jLabel71;
    private javax.swing.JLabel jLabel72;
    private javax.swing.JLabel jLabel73;
    private javax.swing.JLabel jLabel74;
    private javax.swing.JLabel jLabel75;
    private javax.swing.JLabel jLabel76;
    private javax.swing.JLabel jLabel77;
    private javax.swing.JLabel jLabel78;
    private javax.swing.JLabel jLabel79;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel80;
    private javax.swing.JLabel jLabel81;
    private javax.swing.JLabel jLabel82;
    private javax.swing.JLabel jLabel83;
    private javax.swing.JLabel jLabel84;
    private javax.swing.JLabel jLabel85;
    private javax.swing.JLabel jLabel86;
    private javax.swing.JLabel jLabel87;
    private javax.swing.JLabel jLabel88;
    private javax.swing.JLabel jLabel89;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabel90;
    private javax.swing.JLabel jLabel91;
    private javax.swing.JLabel jLabel92;
    private javax.swing.JLabel jLabel93;
    private javax.swing.JLabel jLabel94;
    private javax.swing.JLabel jLabel95;
    private javax.swing.JLabel jLabel96;
    private javax.swing.JLabel jLabel97;
    private javax.swing.JLabel jLabel98;
    private javax.swing.JLabel jLabel99;
    private javax.swing.JList jList1;
    private javax.swing.JList jList2;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel33;
    private javax.swing.JPanel jPanel34;
    private javax.swing.JPanel jPanel35;
    private javax.swing.JPanel jPanel37;
    private javax.swing.JPanel jPanel38;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel44;
    private javax.swing.JPanel jPanel45;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JPasswordField jPasswordField1;
    private javax.swing.JPasswordField jPasswordField3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JSpinner jSpinner1;
    private javax.swing.JSpinner jSpinner3;
    private javax.swing.JSplitPane jSplitPane1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JTabbedPane jTabbedPane3;
    private javax.swing.JTabbedPane jTabbedPane4;
    private javax.swing.JTabbedPane jTabbedPane5;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTable10;
    private javax.swing.JTable jTable2;
    private javax.swing.JTable jTable4;
    private javax.swing.JTable jTable5;
    private javax.swing.JTable jTable6;
    private javax.swing.JTable jTable8;
    private javax.swing.JTable jTable9;
    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField10;
    private javax.swing.JTextField jTextField11;
    private javax.swing.JTextField jTextField12;
    private javax.swing.JTextField jTextField13;
    private javax.swing.JTextField jTextField14;
    private javax.swing.JTextField jTextField15;
    private javax.swing.JTextField jTextField16;
    private javax.swing.JTextField jTextField17;
    private javax.swing.JTextField jTextField18;
    private javax.swing.JTextField jTextField19;
    private javax.swing.JTextField jTextField20;
    private javax.swing.JTextField jTextField21;
    private javax.swing.JTextField jTextField22;
    private javax.swing.JTextField jTextField23;
    private javax.swing.JTextField jTextField24;
    private javax.swing.JTextField jTextField25;
    private javax.swing.JTextField jTextField26;
    private javax.swing.JTextField jTextField27;
    private javax.swing.JTextField jTextField28;
    private javax.swing.JTextField jTextField29;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextField30;
    private javax.swing.JTextField jTextField31;
    private javax.swing.JTextField jTextField32;
    private javax.swing.JTextField jTextField33;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JTextField jTextField5;
    private javax.swing.JTextField jTextField6;
    private javax.swing.JTextField jTextField7;
    private javax.swing.JTextField jTextField8;
    private javax.swing.JTextField jTextField9;
    private javax.swing.JPopupMenu lista_Usuarios;
    private javax.swing.JTextField nom;
    private javax.swing.JTextField nom1;
    private javax.swing.JTextField nom2;
    private javax.swing.JTextField nom3;
    private javax.swing.JTextField nom4;
    private javax.swing.JTextField nom5;
    private javax.swing.JTextField nomm;
    private javax.swing.JTextField nomm1;
    private javax.swing.JTextField person;
    private javax.swing.JTextField person1;
    private javax.swing.JTextField person2;
    public static javax.swing.JComboBox personas;
    public static javax.swing.JLabel precio_cobrar;
    public static javax.swing.JLabel precio_cobrar1;
    public static javax.swing.JLabel recibe;
    private javax.swing.JTextField sex;
    private javax.swing.JPopupMenu tabla_producto;
    private javax.swing.JTextField tel;
    private javax.swing.JComboBox users;
    // End of variables declaration//GEN-END:variables
}
